Skip to content

Fix mypy error abut Chainer in Checks (integration)#4276

Merged
c-bata merged 2 commits intooptuna:masterfrom
Alnusjaponica:fix-checks-integration-chainer
Jan 16, 2023
Merged

Fix mypy error abut Chainer in Checks (integration)#4276
c-bata merged 2 commits intooptuna:masterfrom
Alnusjaponica:fix-checks-integration-chainer

Conversation

@Alnusjaponica
Copy link
Copy Markdown
Contributor

@Alnusjaponica Alnusjaponica commented Dec 23, 2022

Motivation

Solve scheduled Checks (Integration) failure

Description of the changes

Currently, scheduled Checks (Integration) fails die to mypy check with --warn-unused-ignores option. This PR removes a part of the cause related to Chainer.
Although test for Checks (Integration) does't run when PR in opened, I confirmed this PR together with other "Fix mypy error" series reduces mypy error at CI on my fork.

@github-actions github-actions bot added the optuna.integration Related to the `optuna.integration` submodule. This is automatically labeled by github-actions. label Dec 23, 2022
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #4276 (dc95cb3) into master (b4cc098) will not change coverage.
The diff coverage is 87.50%.

@@           Coverage Diff           @@
##           master    #4276   +/-   ##
=======================================
  Coverage   89.76%   89.76%           
=======================================
  Files         170      170           
  Lines       13261    13261           
=======================================
  Hits        11904    11904           
  Misses       1357     1357           
Impacted Files Coverage Δ
optuna/integration/chainer.py 89.74% <87.50%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Alnusjaponica Alnusjaponica marked this pull request as ready for review December 23, 2022 08:03
@Alnusjaponica Alnusjaponica changed the title Fix mypy error abut Chainer in Checks (integration) Fix mypy error abut Chainer in Checks (integration) Dec 23, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2023

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jan 1, 2023
@HideakiImamura
Copy link
Copy Markdown
Member

@cross32768 Could you review this PR?

@github-actions github-actions bot removed the stale Exempt from stale bot labeling. label Jan 4, 2023
Copy link
Copy Markdown
Member

@HideakiImamura HideakiImamura left a comment

Choose a reason for hiding this comment

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

LGTM! I confirmed that the Chainer integration does not occur any errors in Checks (integration). https://github.com/HideakiImamura/optuna/actions/runs/3844638959/jobs/6547923432

@HideakiImamura HideakiImamura removed their assignment Jan 5, 2023
Copy link
Copy Markdown
Contributor

@cross32768 cross32768 left a comment

Choose a reason for hiding this comment

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

LGTM! I confirmed that 8 mypy errors related to chariner are appeared in master branch as shown below, and this PR resolves all.

optuna/integration/chainer.py:10: error: Module "chainer.training.triggers" does not explicitly export attribute "IntervalTrigger"  [attr-defined]
optuna/integration/chainer.py:11: error: Module "chainer.training.triggers" does not explicitly export attribute "ManualScheduleTrigger"  [attr-defined]

tests/integration_tests/test_chainer.py:18: error: Module "chainer.dataset" does not explicitly export attribute "DatasetMixin"  [attr-defined]
tests/integration_tests/test_chainer.py:47: error: "Module chainer.training.triggers" does not explicitly export attribute "IntervalTrigger"  [attr-defined]
tests/integration_tests/test_chainer.py:51: error: "Module chainer.training.triggers" does not explicitly export attribute "IntervalTrigger"  [attr-defined]
tests/integration_tests/test_chainer.py:55: error: "Module chainer.training.triggers" does not explicitly export attribute "ManualScheduleTrigger"  [attr-defined]
tests/integration_tests/test_chainer.py:113: error: "Module chainer.training.triggers" does not explicitly export attribute "IntervalTrigger"  [attr-defined]
tests/integration_tests/test_chainer.py:121: error: "Module chainer.training.triggers" does not explicitly export attribute "IntervalTrigger"  [attr-defined]

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jan 12, 2023
@Alnusjaponica
Copy link
Copy Markdown
Contributor Author

Thank you for your approval.

@github-actions github-actions bot removed the stale Exempt from stale bot labeling. label Jan 15, 2023
@c-bata
Copy link
Copy Markdown
Member

c-bata commented Jan 16, 2023

Let me merge this PR since there are already two approvals.

@c-bata c-bata added this to the v3.1.0 milestone Jan 16, 2023
@c-bata c-bata added CI Continuous integration. code-fix Change that does not change the behavior, such as code refactoring. and removed CI Continuous integration. labels Jan 16, 2023
@c-bata c-bata merged commit fd841ed into optuna:master Jan 16, 2023
@Alnusjaponica Alnusjaponica deleted the fix-checks-integration-chainer branch February 9, 2023 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-fix Change that does not change the behavior, such as code refactoring. optuna.integration Related to the `optuna.integration` submodule. This is automatically labeled by github-actions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants