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

Revision callbacks.data_monitor #848

Open
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

luca-medeiros
Copy link
Contributor

What does this PR do?

Part of #839

  • pl_bolts.callbacks.data_monitor.DataMonitorBase
  • pl_bolts.callbacks.data_monitor.ModuleDataMonitor
  • pl_bolts.callbacks.data_monitor.shape2str
  • pl_bolts.callbacks.data_monitor.TrainingDataMonitor

Minor changes only. Readability, small performance improvement, typehints
Feedback is welcomed 😃

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

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 🙃

Copy link
Contributor

@otaj otaj left a comment

Choose a reason for hiding this comment

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

Hey there! Sorry, it took so long, however, review is here 😂. Overall it looks very good, take a look at few of my comments. Btw, two tests are failing on old torchvision because of UserWarning originating from LitMnist.

E UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:180.)

I think we can safely ignore this

pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

Hi, original author here :))

LGTM

tests/callbacks/test_data_monitor.py Show resolved Hide resolved
tests/callbacks/test_data_monitor.py Show resolved Hide resolved
pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
pl_bolts/callbacks/data_monitor.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready label Aug 14, 2022
@mergify mergify bot removed the ready label Aug 25, 2022
@mergify mergify bot added the ready label Aug 26, 2022
@mergify mergify bot removed the ready label Sep 9, 2022
@otaj
Copy link
Contributor

otaj commented Sep 15, 2022

Hi @luca-medeiros, do you plan to continue on this PR? Thanks ⚡

@mergify mergify bot removed the has conflicts label May 31, 2023
@mergify mergify bot removed the has conflicts label May 31, 2023
@Borda
Copy link
Member

Borda commented Jun 29, 2023

@luca-medeiros how is it going here? 🐰

@Borda
Copy link
Member

Borda commented Jun 30, 2023

@luca-medeiros seems that calls are completely missing:

FAILED tests/callbacks/test_data_monitor.py::test_base_log_interval_override - AssertionError: assert 0 == (3 * 2)
FAILED tests/callbacks/test_data_monitor.py::test_base_log_interval_fallback[1-5-5] - AssertionError: assert 0 == (5 * 2)
FAILED tests/callbacks/test_data_monitor.py::test_base_log_interval_fallback[2-5-2] - AssertionError: assert 0 == (2 * 2)
FAILED tests/callbacks/test_data_monitor.py::test_base_log_interval_fallback[5-5-1] - AssertionError: assert 0 == (1 * 2)

@luca-medeiros
Copy link
Contributor Author

@Borda
Hi Jirka, will check it later this weekend. Any news about bolts that I should know about in order to proceed with this PR?
Cheers

@Borda
Copy link
Member

Borda commented Jun 30, 2023

Any news about bolts that I should know about in order to proceed with this PR?

going to make release 0.7.0 today and then we can continue with improvements, lets sync on Slack 🐿️

Copy link
Contributor

@otaj otaj left a comment

Choose a reason for hiding this comment

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

I don't want to be seeing this in my list of reviews anymore, so, I'm approving :D

How are you guys doing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants