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

Improve env sanity check to be more robust #612

Merged
merged 12 commits into from
Jan 17, 2023

Conversation

Louis-Dupont
Copy link
Contributor

@Louis-Dupont Louis-Dupont commented Jan 10, 2023

Objectif:

  • Support any time of requirements
  • Improve the logic of version testing (current implementation is really getting dirty)

Besides, I also:

  • Divided it into a few files: Motivation: facilitate reading.
  • Moved all the error logging inside the checking functions themselves, instead of carrying them through and logging everyhting at the end. Motivation: making the code more clear and simple.

Note:
I started with semantic-version (https://python-semanticversion.readthedocs.io/en/latest/reference.html) and packaging, but actually found a better way only using only pkg_resources. It supports the PyPi requirements standard.

@dagshub
Copy link

dagshub bot commented Jan 10, 2023

@Louis-Dupont Louis-Dupont marked this pull request as ready for review January 11, 2023 12:18
Copy link
Collaborator

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

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

Looks good and robust now!
Just a few comments inline.

src/super_gradients/sanity_check/env_sanity_check.py Outdated Show resolved Hide resolved
src/super_gradients/sanity_check/env_sanity_check.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

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

LGTM

@Louis-Dupont Louis-Dupont merged commit 94ca017 into master Jan 17, 2023
@Louis-Dupont Louis-Dupont deleted the feature/SG-553-refactor_sanity_check_version branch January 17, 2023 08:18
Louis-Dupont added a commit that referenced this pull request Jan 17, 2023
* first version - a few things to change

* improve

* imrpove doc

* undo requirements change

* mini update

* support wildcards and improve code

* move all to same file, and only raise error when version too small

* move all to same file, and only raise error when version too small

* remove arg
Louis-Dupont added a commit that referenced this pull request Jan 19, 2023
* change requirements.txt

* try to fix version

* add version

* test 1.13.5

* New callbacks API (#607)

* New callbacks API

* New callbacks API

* New callbacks API

* Fix imports

* Uncomment sanity check

* Fix callbacks order

* Fix callbacks order

* Fix callbacks order

* Fix wrong import

* Fix wrong import

* Call update_context

* Call update_context

* Fix on_train_batch_start timing

* Added docs clarifying mapping of new events to old Phase enum values

* Instantiate context after _prep_for_test

Co-authored-by: Shay Aharon <80472096+shaydeci@users.noreply.github.com>

* first version (#626)

Co-authored-by: Shay Aharon <80472096+shaydeci@users.noreply.github.com>

* Improve env sanity check to be more robust (#612)

* first version - a few things to change

* improve

* imrpove doc

* undo requirements change

* mini update

* support wildcards and improve code

* move all to same file, and only raise error when version too small

* move all to same file, and only raise error when version too small

* remove arg

* 1.13.*

* catch warning and fix requirement

* remove catching * warning

* try 1.14 to pass security check

* replace <=1.13 to <1.14

Co-authored-by: Eugene Khvedchenya <ekhvedchenya@gmail.com>
Co-authored-by: Shay Aharon <80472096+shaydeci@users.noreply.github.com>
Co-authored-by: Ofri Masad <ofrimasad@users.noreply.github.com>
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