Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import functions and classes directly #342

Open
parhamfh opened this issue Jan 4, 2023 · 0 comments
Open

Cannot import functions and classes directly #342

parhamfh opened this issue Jan 4, 2023 · 0 comments

Comments

@parhamfh
Copy link

parhamfh commented Jan 4, 2023

First of all, thank you for a nice library for rankers 馃樅

I found out you cannot import as you would expect from the documentation. This is not specific to the metrics module, but to illustrate my point I'm using https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/metrics/MRRMetric

>>> import tensorflow_ranking
>>> tensorflow_ranking.keras.metrics.MRRMetric
<class 'tensorflow_ranking.python.keras.metrics.MRRMetric'>
>>> from tensorflow_ranking.keras.metrics import MRRMetric
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow_ranking.keras'

Seeing as how the docs specify that the MRRMetric should be available to import on this path, this is a bit misleading. You can of course import from tensorflow_ranking.python.keras.metrics but that is not immediately obvious from the documentation.

Version: 0.5.1.dev

馃檱馃徑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant