Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tensorflow_datasets required as invisible dependency with 1.6.0 #1472

Closed
SleepySpaceBear opened this issue Apr 23, 2024 · 2 comments
Closed
Assignees

Comments

@SleepySpaceBear
Copy link

SleepySpaceBear commented Apr 23, 2024

When using datum version 1.6.0 with Python 3.10.12, I came across an attribute error when running the datum command. By editing import_util.py to see what was being passed to the function, I found that tensorflow_datasets is passed. Since I did not have tensorflow_datasets installed in my virtual environment, the program crashes. I resolved the issue by installing tensorflow_datasets, but tensorflow_datasets is not in the requirement files

$ datum 
Traceback (most recent call last):
  File "/home/gabriel/.virtualenvs/traffic/bin/datum", line 5, in <module>
    from datumaro.cli.__main__ import main
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/cli/__main__.py", line 11, in <module>
    from ..util.telemetry_utils import (
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/util/telemetry_utils.py", line 12, in <module>
    from datumaro.cli import commands, contexts
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/cli/commands/__init__.py", line 7, in <module>
    from . import (
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/cli/commands/download.py", line 14, in <module>
    from datumaro.components.extractor_tfds import (
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/components/extractor_tfds.py", line 49, in <module>
    tfds = lazy_import("tensorflow_datasets")
  File "/home/gabriel/.virtualenvs/traffic/lib/python3.10/site-packages/datumaro/util/import_util.py", line 13, in lazy_import
    loader = importlib.util.LazyLoader(spec.loader)
AttributeError: 'NoneType' object has no attribute 'loader'
@SleepySpaceBear SleepySpaceBear changed the title tensorflow-:q tensorflow_datasets required as invisible dependency with 1.6.0 Apr 23, 2024
@SleepySpaceBear
Copy link
Author

If I have time this week, I'm willing to work on a PR and to figure out whether tensorflow_datasets is actually required or not. If it is, I'll just update the requirement files. If not, I'll figure out something else

@sooahleex
Copy link
Contributor

Hi @SleepySpaceBear, Thank you for your interest in our project. This bug has been already reported in #1444 and has been fixed through #1454. It will be included in the upcoming release, version 1.6.1. Please retry with version 1.6.1 and if you still encounter the issue, please let me know.

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

No branches or pull requests

2 participants