Skip to content

Conversation

@Devanshu24
Copy link
Contributor

@Devanshu24 Devanshu24 commented Feb 7, 2021

Fixes #1618

Description:

  • Change pre-commit config and CONTRIBUTING.md
    • Update hook versions
    • Remove seed-isort-config (details here)
    • Add black profile to isort (details here)
  • Fix files based on you pre-commit config

Check list:

  • New tests are added (if a new feature is added) (N.A.)
  • New doc strings: description and/or example code are in RST format (N.A.)
  • Documentation is updated (if required)

- Update hook versions
- Remove seed-isort-config
- Add black profile to isort
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 7, 2021

Thanks @Devanshu24 ! Modifications of md, yml files looks reasonable, but svg images, sh and notebooks shouldn't be modified, I think. Let's revert that.

@Devanshu24
Copy link
Contributor Author

Thanks @Devanshu24 ! Modifications of md, yml files looks reasonable, but svg images and notebooks shouldn't be modified, I think. Let's revert that.

Okay, even I was doubtful on those. Thanks!

@Devanshu24
Copy link
Contributor Author

Done, also added .rst and .gitignore. If you want can revert them :)

@Devanshu24
Copy link
Contributor Author

Out of curiosity, why did we not update the version for black ?

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 7, 2021

Out of curiosity, why did we not update the version for black ?

It produces more garbage in the code for me.

@Devanshu24
Copy link
Contributor Author

Out of curiosity, why did we not update the version for black ?

It produces more garbage in the code for me.

Ohh okay, makes sense! Thanks :)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 7, 2021

These tools produce rather opinionated changes saying that this is "nicer" or "prettier" which is really a matter of taste in some cases... That's why i'd like to keep changes minimal as possible....

@Devanshu24
Copy link
Contributor Author

Prettier won't let me change tables in the markdown files (gives an error during commit)
We could do 2 things:

  • Find some older prettier version that allows it
  • It is not looking so bad on full screen so maybe we could keep it (image below for reference)
    Screenshot from 2021-02-07 16-08-18

Which would you prefer?

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 7, 2021

Prettier won't let me change tables in the markdown files (gives an error during commit)
We could do 2 things:

* Find some older prettier version that allows it

* It is not looking so bad on full screen so maybe we could keep it (image below for reference)
  ![Screenshot from 2021-02-07 16-08-18](https://user-images.githubusercontent.com/56106207/107144083-bc2f7080-695e-11eb-9973-1a09f29c9c9f.png)

Which would you prefer?

I'm hesitating between removing this prettier and just having it optional without changing all files...

@Devanshu24
Copy link
Contributor Author

Prettier won't let me change tables in the markdown files (gives an error during commit)
We could do 2 things:

* Find some older prettier version that allows it

* It is not looking so bad on full screen so maybe we could keep it (image below for reference)
  ![Screenshot from 2021-02-07 16-08-18](https://user-images.githubusercontent.com/56106207/107144083-bc2f7080-695e-11eb-9973-1a09f29c9c9f.png)

Which would you prefer?

I'm hesitating between removing this prettier and just having it optional without changing all files...

One option may be to selectively keep it? Make it ignore markdown files, and only run on python files.
Not sure how good of an option it is, just came to my mind :)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 7, 2021

@Devanshu24 I agree, let's configure it to run only on text files like .md, .rst, .yml and not .py, .ipynb, .sh, .gitignore.
Then, OK for those table formatting if we could avoid at least the one in README.md with a enormous line of dashes, would be great...

@Devanshu24
Copy link
Contributor Author

@Devanshu24 I agree, let's configure it to run only on text files like .md, .rst, .yml and not .py, .ipynb, .sh, .gitignore.
Then, OK for those table formatting if we could avoid at least the one in README.md with a enormous line of dashes, would be great...

Sure, I think that'll be doable!
I'll get to it :)

Devanshu24 and others added 2 commits February 8, 2021 20:55
- Also update actions workflow files to match local pre-commit
@Devanshu24
Copy link
Contributor Author

Made the changes, please have a look at your convenience :)

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks @Devanshu24 !

@vfdev-5 vfdev-5 merged commit 0b3e181 into pytorch:master Feb 8, 2021
@Devanshu24 Devanshu24 deleted the fix-pre-commit branch February 8, 2021 16:35
fco-dv pushed a commit to fco-dv/ignite that referenced this pull request Feb 15, 2021
* Change pre-commit config and CONTRIBUTING.md

- Update hook versions
- Remove seed-isort-config
- Add black profile to isort

* Fix files based on new pre-commit config

* Add meaningful exclusions to prettier

- Also update actions workflow files to match local pre-commit
vfdev-5 added a commit that referenced this pull request Feb 21, 2021
* Recall/Precision metrics for ddp : average == false and multilabel == true

* For v0.4.3 - Add more versionadded, versionchanged tags - Change v0.5… (#1612)

* For v0.4.3 - Add more versionadded, versionchanged tags - Change v0.5.0 to v0.4.3

* Update ignite/contrib/metrics/regression/canberra_metric.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/contrib/metrics/regression/manhattan_distance.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/contrib/metrics/regression/r2_score.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/handlers/checkpoint.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* address PR comments

Co-authored-by: vfdev <vfdev.5@gmail.com>

* added TimeLimit handler with its test and doc (#1611)

* added TimeLimit handler with its test and doc

* fixed documentation

* fixed docstring and formatting

* flake8 fix trailing whitespace :)

* modified class logger , default value and tests

* changed rounding to nearest integer

* tests refactored , docs modified

* fixed default value , removed global logger

* fixing formatting

* Added versionadded

* added test for engine termination

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update handlers to use setup_logger (#1617)

* Fixes #1614
- Updated handlers EarlyStopping and TerminateOnNan
- Replaced `logging.getLogger` with `setup_logger` in the mentioned handlers

* Updated `TimeLimit` handler.
Replaced use of `logger.getLogger` with `setup_logger` from `ignite.utils`

Co-authored-by: Pradyumna Rahul K <pradyumnar@sahaj.ai>
Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>

* Managing Deprecation using decorators (#1585)

* Starter code for managing deprecation

* Make functions deprecated using the `@deprecated` decorator
* Add arguments to the @deprecated decorator to customize it for each function

* Improve `@deprecated` decorator and add tests

* Replaced the `raise` keyword with added `warnings`
* Added tests several possibilities of the decorator usage

* Removing the test deprecation to check tests

* Add static typing, fix mypy errors

* Make `@deprecated` to raise Exceptions or Warning

* The `@deprecated` decorator will now always emit warning unless explicitly asked to raise an Exception

* Fix mypy errors

* Fix mypy errors (hopefully)

* Fix the test `test_deprecated_setup_any_logging`

* Change the test to work with the `@deprecated` decorator

* Change to snake_case, handle mypy ignores

* Improve Type Annotations

* Update common.py

* For v0.4.3 - Add more versionadded, versionchanged tags - Change v0.5… (#1612)

* For v0.4.3 - Add more versionadded, versionchanged tags - Change v0.5.0 to v0.4.3

* Update ignite/contrib/metrics/regression/canberra_metric.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/contrib/metrics/regression/manhattan_distance.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/contrib/metrics/regression/r2_score.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update ignite/handlers/checkpoint.py

Co-authored-by: vfdev <vfdev.5@gmail.com>

* address PR comments

Co-authored-by: vfdev <vfdev.5@gmail.com>

* `version` -> version

Co-authored-by: vfdev <vfdev.5@gmail.com>
Co-authored-by: François COKELAER <francois.cokelaer@gmail.com>
Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>

* Create documentation.md

* Distributed tests on Windows should be skipped until fixed. (#1620)

* modified CONTRIBUTING.md

* bash instead of sh

* Added Checkpoint.get_default_score_fn (#1621)

* Added Checkpoint.get_default_score_fn to simplify best_model_handler creation

* Added score_sign argument

* Updated docs

* Update about.rst

* Update pre-commit hooks and CONTRIBUTING.md (#1622)

* Change pre-commit config and CONTRIBUTING.md

- Update hook versions
- Remove seed-isort-config
- Add black profile to isort

* Fix files based on new pre-commit config

* Add meaningful exclusions to prettier

- Also update actions workflow files to match local pre-commit

* added requirements.txt and updated readme.md (#1624)

* added requirements.txt and updated readme.md

* Update examples/contrib/cifar10/README.md

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Update examples/contrib/cifar10/requirements.txt

Co-authored-by: vfdev <vfdev.5@gmail.com>

Co-authored-by: vfdev <vfdev.5@gmail.com>

* Replace relative paths with raw.githubusercontent (#1629)

* Updated cifar10 example (#1632)

* Updates for cifar10 example

* Updates for cifar10 example

* More updates

* Updated code

* Fixed code-formatting

* Fixed failling CI and typos for cifar10 examples (#1633)

* Updates for cifar10 example

* Updates for cifar10 example

* More updates

* Updated code

* Fixed code-formatting

* Fixed typo and failing CI

* Fixed hvd spawn fail and better synced qat code

* Removed temporary hack to install pth 1.7.1 (#1638)

- updated default pth image for gpu tests
- updated TORCH_CUDA_ARCH_LIST
- fixed /merge -> /head in trigger ci pipeline

* [docker] Pillow -> Pillow-SIMD (#1509) (#1639)

* [docker] Pillow -> Pillow-SIMD (#1509)

* [docker] Pillow -> Pillow-SIMD

* replace pillow with pillow-simd in base docker files

* chore(docker): apt-get autoremove after pillow-simd installation

* apt-get install at once, autoremove g++

* install g++ in pillow installation layer

Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>

* Fix g++ install issue

Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>

* Fix multinode tests script (#1631)

* fix run_multinode_tests_in_docker.sh : run tests with docker python version

* add missing modules

* build an image with test env and add 'nnodes' 'nproc_per_node' 'gpu' as parameters

* #1615 : change nproc_per_node default to 4

* #1615 : fix for gpu enabled tests / container rm step at the end of the script

* add xfail decorator for tests/ignite/engine/test_deterministic.py::test_multinode_distrib_cpu

* fix script gpu_options

* add default tol=1e-6 for _test_distrib_compute_on_criterion

* fix for "RuntimeError: trying to initialize the default process group twice!"

* tolerance for test_multinode_distrib_cpu case only

* fix assert None error

* autopep8 fix

Co-authored-by: vfdev <vfdev.5@gmail.com>
Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>
Co-authored-by: fco-dv <fco-dv@users.noreply.github.com>

* remove warning for average=False and is_multilabel=True

* update docstring and {precision, recall} tests according to test_multilabel_input_NCHW

Co-authored-by: vfdev <vfdev.5@gmail.com>
Co-authored-by: Ahmed Omar <40790298+ahmedo42@users.noreply.github.com>
Co-authored-by: Pradyumna Rahul <prkinformed@gmail.com>
Co-authored-by: Pradyumna Rahul K <pradyumnar@sahaj.ai>
Co-authored-by: Sylvain Desroziers <sylvain.desroziers@gmail.com>
Co-authored-by: Devanshu Shah <56106207+Devanshu24@users.noreply.github.com>
Co-authored-by: Debojyoti Chakraborty <debomastet335@gmail.com>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: fco-dv <fco-dv@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.

Update CONTRIBUTING and pre-commit file

2 participants