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

Move nlpaug to lazy import #2718

Merged
merged 2 commits into from
Jan 18, 2023
Merged

Conversation

sxjscience
Copy link
Collaborator

@sxjscience sxjscience commented Jan 18, 2023

Issue #, if available:

#2706

Description of changes:

  • Move nlpaug-related code to lazy import.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Innixma
Copy link
Contributor

Innixma commented Jan 18, 2023

Have we measured the impact on import speed with this change?

Copy link
Contributor

@Innixma Innixma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sxjscience
Copy link
Collaborator Author

In the process of testing on Colab. Will share results shortly.

@github-actions
Copy link

Job PR-2718-17068ef is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2718/17068ef/index.html

@github-actions
Copy link

Job PR-2718-73815eb is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2718/73815eb/index.html

@sxjscience
Copy link
Collaborator Author

Verified that nlpaug is gone:

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000   28.388   28.388 /content/autogluon/multimodal/src/autogluon/multimodal/__init__.py:1(<module>)
  168/102    0.000    0.000   21.047    0.206 /usr/lib/python3.8/importlib/__init__.py:109(import_module)
        1    0.000    0.000   11.468   11.468 /content/autogluon/multimodal/src/autogluon/multimodal/models/__init__.py:1(<module>)
        1    0.000    0.000   11.377   11.377 /usr/local/lib/python3.8/dist-packages/accelerate/__init__.py:5(<module>)
        1    0.000    0.000   11.361   11.361 /usr/local/lib/python3.8/dist-packages/accelerate/utils/__init__.py:5(<module>)
        1    0.000    0.000    9.846    9.846 /content/autogluon/multimodal/src/autogluon/multimodal/optimization/__init__.py:1(<module>)
        1    0.001    0.001    7.595    7.595 /usr/local/lib/python3.8/dist-packages/tensorflow/__init__.py:15(<module>)
        1    0.000    0.000    7.004    7.004 /content/autogluon/multimodal/src/autogluon/multimodal/data/__init__.py:1(<module>)
        1    0.000    0.000    5.819    5.819 /usr/local/lib/python3.8/dist-packages/torch/distributed/launcher/__init__.py:10(<module>)
        1    0.001    0.001    4.934    4.934 /usr/local/lib/python3.8/dist-packages/tensorflow/python/__init__.py:15(<module>)
        1    0.000    0.000    3.841    3.841 /usr/local/lib/python3.8/dist-packages/torch/distributed/elastic/multiprocessing/__init__.py:9(<module>)
        1    0.000    0.000    2.376    2.376 /usr/local/lib/python3.8/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py:9(<module>)
        1    0.000    0.000    2.192    2.192 /content/autogluon/multimodal/src/autogluon/multimodal/utils/__init__.py:1(<module>)
        1    0.000    0.000    2.027    2.027 /usr/local/lib/python3.8/dist-packages/evaluate/__init__.py:20(<module>)

@sxjscience sxjscience merged commit b9cc3fb into autogluon:master Jan 18, 2023
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.

None yet

2 participants