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

Fix callback metrics for non-Tensor types #550

Closed
wants to merge 52 commits into from
Closed

Fix callback metrics for non-Tensor types #550

wants to merge 52 commits into from

Conversation

ctlaltdefeat
Copy link
Contributor

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
  • Did you read the contributor guideline?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes issue where metrics of primitive type (float, int, etc.) were causing an issue with logging.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@ctlaltdefeat ctlaltdefeat changed the title Update logging_mixin.py Fix callback metrics for non-Tensor types Nov 26, 2019
MikeScarp and others added 2 commits November 26, 2019 04:59
* min pytorch 1.2

* fix IterableDataset

* upgrade torchvision

* fix msg
Copy link
Contributor

@neggert neggert left a comment

Choose a reason for hiding this comment

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

Nice job. Just ran into this problem yesterday.

Copy link
Contributor

@jeffling jeffling left a comment

Choose a reason for hiding this comment

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

I'll also add a redundant approve since this is something we ran into as well at work :)

akhti and others added 7 commits November 26, 2019 22:35
* refactor: rename some modules

* add deprecation warnings

* fix paths
* extend CI timeout

* add short MNIST

* lower dataset and stop thr

* refactor imports

* formatting

* early stop

* play params

* play params

* minor refactoring

# Conflicts:
#	pytorch_lightning/testing/__init__.py
#	pytorch_lightning/testing/lm_test_module.py
#	pytorch_lightning/testing/lm_test_module_base.py
#	pytorch_lightning/testing/lm_test_module_mixins.py
#	pytorch_lightning/testing/model.py
#	pytorch_lightning/testing/model_base.py
#	pytorch_lightning/testing/model_mixins.py
#	pytorch_lightning/testing/test_module.py
#	pytorch_lightning/testing/test_module_base.py
#	pytorch_lightning/testing/test_module_mixins.py

* typo

Co-Authored-By: Ir1dXD <[email protected]>

* Revert "refactor imports"

This reverts commit b86aee9

* update imports
* upgrade req.

* move MkDocs

* create Sphinx

* init Sphinx

* move md from MkDocs to Sphinx

* CI: build docs

* build Sphinx

formatting

move docs from MD to docstring in particular package/modules

formatting

add Sphinx ext.

rename root_module to core

drop implicit name "_logger"

drop duplicate name "overwrite"

fix imports

use pytorch theme

add sample link mapping

try fix RTD build

use forked template

fix some docs warnings

fix paths

add deprecation warnings

fix flake8

fix paths

revert refactor

revert MLFlowLogger

* revert example import

* update link

* Update lightning_module_template.py
* set auto dp if no backend

* fix imagenet example

* run flake8 first to fail build on syntax first
dreamgonfly and others added 22 commits November 30, 2019 16:48
* Add resume_from_checkpoint

* Fix variable name

* #515 Remove did_restore

* #515 Simplify code

* #515 Update doc for resume_from_checkpoint

* #515 Add on_gpu
* min pyTorch 1.1

* try fixed test-tube

* try fixed test-tube

* try fixed test-tube

* cleaning

* Update requirements.txt
* feat: add reducelronplateau callback

* feat: use reducelronplateau callback in trainer

* feat: only on unsupported lr schedulers

* feat: last but not the least merge of master

* feat: merge master

* feat: support only on scheduler in reduceLrOnPlateauScheduler

* refactor: code style

* Update pt_callbacks.py

* Update trainer.py

* Update train_loop_mixin.py

* Update trainer.py

* Update train_loop_mixin.py
* Use pytest tmpdir

* Switch to tmpdir fixtures

* Switch to tmpdir fixture

* tmpdir fixture

* Fix more conflicts
* format docstring in tests

* prune unused vars

* optimize imports

* drop duplicated var
* rename nb -> num

* flake8

* batch_nb, epoch_nb, gpu_nb, split_nb

* add _num deprecations
* fix defecation warnings

* flake8

* update deprecations
* fix logging error

* no need for the '+' sign

* move space to beginning of next line
* use print for INFO and lower levels summarize()

* use logging.INFO instead of magic number

* bring logging.info back for other cases

* move logging config to __init__.py

* prepend the model summary with a newline
* fixed gan template

* Update gan.py
* make partial Trainer classes as abstract

* add empty attributes/methods

* flake8

* fix mixin order

* update abstact

* reorder
* rename trainer modules, drop _mixin

* fix imports
* add slack badge

* Update README.md
* extend documentation

* update index

* fix list
* monkeypatch atexit.register to fix problem with cometml logging

* Use experiment id for version in cometml
…ion check when number of validation dataloaders >= 2 (#597)

* type: debug

Calculate the adequate number of steps to run during sanity_check.
This fixes the bug when there are two or more validation dataloaders.

- Before: total=self.num_sanity_val_steps
- After: total=self.num_sanity_val_steps*len(self.get_val_dataloaders())

* type: refactor

Put total=... in the next line

* type: refactor

run flake8
* add table for gpus argument

* fix typo in error message

* tests for supported values

* tests for unsupported values

* fix typo

* add table for gpus argument

* fix typo in error message

* tests for supported values

* tests for unsupported values

* fix typo

* fix typo list->str

* fix travis warning "line too long"
* change CI install

* change CI install

* change CI install
@williamFalcon
Copy link
Contributor

@ctlaltdefeat hi! mind rebasing today so we can merge into master?

schwobr and others added 3 commits December 7, 2019 08:52
* Renamed `on_sanity_check_start` to `on_train_start` and added `on_train_end` to `ModelHooks`

* changed tests to use `on_train_start` instead of `on_sanity_check_start`
@williamFalcon
Copy link
Contributor

@ctlaltdefeat ummm you might have merged instead? maybe it's easier to clone master fresh and resubmit the PR? Can't approve a PR with 103 file changes

@ctlaltdefeat
Copy link
Contributor Author

ctlaltdefeat commented Dec 7, 2019

@williamFalcon oh, you may be right. i'll just resubmit it

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.