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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow gluoncv.auto to work without mxnet #1685

Merged
merged 6 commits into from
Jul 22, 2021

Conversation

zhreshold
Copy link
Member

Used dummy dynamic modules/class to bypass mxnet import, which also provides hints when specific functions are used without mxnet installed.

Example when import Estimators that requires mxnet:

python -c "from gluoncv import auto; e = auto.estimators.ImageClassificationEstimator({})"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/zhiz/Dev/gluon-cv/gluoncv/auto/estimators/utils.py", line 7, in _dummy_constructor
    raise RuntimeError(self.reason.format(type(self).__name__))
RuntimeError: gluoncv.auto.estimators.ImageClassificationEstimator requires mxnet to be installed which is missing.

@github-actions
Copy link

Job PR-1685-ddd813a is done.
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/PR-1685/ddd813a/index.html

@zhreshold zhreshold merged commit f662dae into dmlc:master Jul 22, 2021
@zhreshold zhreshold deleted the auto-mx-optional branch July 22, 2021 23:32
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

Successfully merging this pull request may close these issues.

1 participant