Skip to content

Conversation

@jxtngx
Copy link
Contributor

@jxtngx jxtngx commented Jul 4, 2022

What does this PR do?

Fixes mypy errors attributed to pytorch_lightning.loggers.csv_logs.py for issue #13445

  1. removed module name from pyproject.toml [tool.mypy.overrides]
  2. Made the following changes
    • add annotation in ExperimentWriter __init __
    • add hints in ExperimentWriter log_metrics._handle_value
    • update CSVLogger __init __
    • update CSVLogger root_dir return
    • ignore CSVLogger experiment property decorator
    • update CSVLogger version return type
    • update CSVLogger _get_next_version return type
    • update CSVLogger experiment property

Fixes #<issue_number>

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • 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? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

jxtngx added 3 commits July 1, 2022 07:48
- add annotation in ExperimentWriter __init__
- add hints in ExperimentWriter log_metrics._handle_value
- update CSVLogger __init__
- update CSVLogger root_dir return
- ignore CSVLogger experiment property decorator
- update CSVLogger version return type
- update CSVLogger _get_next_version return type
@akihironitta akihironitta added logger: csv code quality community This PR is from the community labels Jul 4, 2022
@akihironitta akihironitta added this to the pl:1.7 milestone Jul 4, 2022
jxtngx added 2 commits July 4, 2022 21:29
annotated self._experiment as ExperimentWriter in CSVLogger __ init__ and changed if self._experiment to if hasattr to account for change
@jxtngx jxtngx marked this pull request as ready for review July 5, 2022 02:01
jxtngx added 2 commits July 5, 2022 07:25
- improve annotations in ExperimentWriter __init__
- fix CSVLogger.log_metrics return type
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.

LGTM

To get rid of the annoying _notebooks, just do

git checkout master _notebooks
git commit ...

@jxtngx jxtngx mentioned this pull request Jul 7, 2022
52 tasks
@akihironitta akihironitta changed the title Fix mypy errors attributed to pytorch_lightning.loggers.csv_logs.py for issue #13445 Fix mypy errors attributed to pytorch_lightning.loggers.csv_logs.py Jul 8, 2022
Copy link
Contributor

@akihironitta akihironitta left a comment

Choose a reason for hiding this comment

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

@JustinGoheen Left minor comments. Looks good to me!

Also, the following PRs are waiting on checks, is there anything more I need to do before the remaining checks can run?

Let's wait for other reviews!

@mergify mergify bot added the ready PRs ready to be merged label Jul 8, 2022
@otaj otaj enabled auto-merge (squash) July 8, 2022 15:03
@otaj otaj merged commit 0a6dc52 into Lightning-AI:master Jul 12, 2022
jerome-habana pushed a commit to jerome-habana/lightning that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality community This PR is from the community logger: csv ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants