* Use .comet.config file or env var for API key.
* Make CometLogger API key changes backwards compatible.
* Fix line too long.
* Add documentation about loading from ~/.comet_config.
* Update required comet_ml version.
* Comet logger: allow offline experiments with config file.
This adds a new argument to the logger to control the online / offline mode explicitly so that if you give an API key and a save_dir (e.g. to control where checkpoints go while having ~/.comet.config) you can specify which mode you want.
* Make CometLogger API key changes backwards compatible.
* Comet logger: change online argument to be offline.
For consistency with other loggers.
* chlog
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
* Override the default gather method to support scalars
* add computing average of a list
* bug: change if to elif
* add some tests
* change style
* change documentation
* use apply_to_collection in DP gather
* use apply_to_collection in DP gather
* fix warning msg
* override gather method in DP
* add tests for python scalars
* add python scalars to docstring
* Update message
* override gather method in DP
* formatting
* chlog
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
* add ddp sync for logging in result step
* pep8
* pep8
* make ddp tests run also on cpu (except windowws)
* create class instance in ddp test
* revert automated formatting
* pep8
* Fix num_classes warning
Put to_categorical before get_num_classes in metrics/functional/classification.py
* Update classification.py
Remove whitespaces in blank line.
* Fix shuffle for distributed sampler
* add test
* test
* chlog
* update test
* update test
* update test
* assertions via callback
* define callback outside for pickling
* skip ddp test on windows
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Test using torchtext.data.Field with include_lengths=True/False
* Fix issue that Tensors in a Batch generated by torchtext with torchtext.data.Field configured as include_lengths=True
* Add description for fix of issue #2688
* changes to accomodate CodeFactor issues
* Another attemt to make last CodeFactor issue pass (it's a false alarm)
* temporarly disable test of test_grad_tracking to check if testing will pass
* reenable test in test_grad_norm
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Renamed get_torchtext_data_iterator to _get_torchtext_data_iterator as suggested by @borda
* Update pytorch_lightning/utilities/apply_func.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* adding tests more specific to batch_move_data_to_device with tochtext Batch
* added check that Tensors were moved to target device
* removed tests using RNN models to be moved into a separate PR
* fixing FLAKE8 errors that showed up after merge from master branch
modified: tests/base/datamodules.py
modified: tests/callbacks/test_model_checkpoint.py
* parameterized test to reduce code duplication
* Added check only if length tensor exist. Removed left over comments.
* rearranged device parameterization and added pytest.param
* Try to figure out why only one device is tested on Linux machines
* Testing on CPU and GPU devices (GPU test is skip if no cuda device is available.
* added test for TPU device (experimental)
* Adding test parameterization for TPU test (experimental)
* change import statement to limit what is imported for a TPU environment
* made test work with TPU
* Change to trigger CI
* Change to trigger CI
* uncommented TPU test to check CI
* reenabling TPU test
* small change to trigger CI build
* small change to trigger CI build
* small change to trigger CI build
* adding tests/utilities/test_apply_func_torchtext.py to CI TPU test
* try to make test not skipped on CI with TPU
* remove testing on TPU
* undo an accidental change to test_tpu.py (file should not have been touched)
* small change to trigger CI build
* small change to trigger CI build
* Update tests/utilities/test_apply_func_torchtext.py
* Revert to previous version
* Apply suggestions from code review
* Change to trigger CI
Co-authored-by: Thomas Schaaf <tschaaf@mmm.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Thomas Schaaf <tschaaf@cs.cmu.edu>
* export model to onnx
* prepare data before exporting
* support for dataloaders and tensors
* added tests
* use example_input_array
add to changelog
* updated docstring
* added onnx inference tests
* temp commit
* removed schema valid test
* add onnxruntime to environment.yml
* moved onnxruntime to environment.yml pip
* add example in doc
* add lines between code block
* added PR to changelog
* is file check
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* remove *
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* infer example outputs
* added doctest for onnx
* fix windows tests
* moved eval within condition block
* self.forward to self
* added docs
* fixed docs error
* added to toctree
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* pt 1.6
* don't use the new zipfile serialization for now
* quick flake8 fixes
* remove unnecessary f
* coalesce strings
* remove comma
* remove extra commas
* Apply suggestions from code review
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
* set _use_new_zipfile_serialization to False only for pytorch 1.6.0
* remove unnecessary comments
* flake8 fixes
* use pkg_resources instead of packaging
* readme
* format
* version
* chlog
Co-authored-by: Peter Yu <peter@asapp.com>
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
The speed up is achieved by:
- Moving the "where" out of the loop (and replacing with min for simplicity).
- Replacing manual sum and pow with torch.norm. Even though this results
in unnessecary computation (computing pow(root)) this is still a lot
faster.
- Preallocating the output gives a slight speed up.
Note that calling .to for all parameters results in a small speed
penalty (~4 ms in my case) but allows parameters on different devices.
Overall this reduces the time used for gradient clipping from 206ms to
74 ms for my model (Resnet50 + few additional vars, all vars on GPU).