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: 🚨Additional commits for issue #778 #780

Merged
merged 17 commits into from
Dec 10, 2022

Conversation

Anselmoo
Copy link
Contributor

@Anselmoo Anselmoo commented Dec 5, 2022

Objective

During taking care about the flake8 issue #778, keras_tuner for cross-checked
via

sourcery review ./keras_tuner/ --disable inline-immediately-returned-variable --disable remove-unnecessary-cast 

for refactoring possibilities:

  • use-fstring-for-concatenation
  • assign-if-exp
  • reintroduce-else
  • use-fstring-for-formatting
  • for-append-to-extend
  • for-index-underscore
  • collection-builtin-to-comprehension
  • comprehension-to-generator
  • remove-unnecessary-else
  • boolean-if-exp-identity
  • list-comprehension
  • merge-dict-assign
  • use-any
  • identity-comprehension
  • instance-method-first-arg-name
  • invert-any-all
  • or-if-exp-identity
  • remove-str-from-fstring
  • simplify-boolean-comparison
  • swap-if-else-branches
  • swap-if-expression
  • use-next
  • aug-assign
  • class-method-first-arg-name
  • collection-into-set
  • dict-comprehension
  • do-not-use-bare-except
  • raise-from-previous-error
  • remove-assert-true
  • remove-dict-keys
  • remove-unreachable-code
  • simplify-len-comparison
  • sum-comprehension

The PR is designed so that single commits can be dropped out. And the code basis stays consistent PEP 20

See also:

@Anselmoo Anselmoo marked this pull request as ready for review December 5, 2022 13:29
@Anselmoo Anselmoo changed the title Additional commits for issue #778 fix: 🚨Additional commits for issue #778 Dec 5, 2022
@haifeng-jin haifeng-jin self-requested a review December 5, 2022 18:43
@haifeng-jin haifeng-jin self-assigned this Dec 5, 2022
@haifeng-jin
Copy link
Collaborator

Thanks for the PR! I will take a careful review later to make sure no bug was introduced.

keras_tuner/distribute/oracle_chief_test.py Outdated Show resolved Hide resolved
keras_tuner/engine/oracle.py Outdated Show resolved Hide resolved
keras_tuner/engine/oracle.py Show resolved Hide resolved
keras_tuner/engine/trial.py Show resolved Hide resolved
keras_tuner/tuners/bayesian.py Outdated Show resolved Hide resolved
keras_tuner/utils.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2022

Codecov Report

Base: 95.02% // Head: 95.02% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (e094dc4) compared to base (d27400c).
Patch coverage: 98.31% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #780      +/-   ##
==========================================
- Coverage   95.02%   95.02%   -0.01%     
==========================================
  Files          48       48              
  Lines        3137     3073      -64     
==========================================
- Hits         2981     2920      -61     
+ Misses        156      153       -3     
Impacted Files Coverage Δ
keras_tuner/applications/augment.py 90.58% <ø> (ø)
keras_tuner/applications/efficientnet.py 87.30% <ø> (ø)
keras_tuner/distribute/utils.py 63.26% <0.00%> (ø)
keras_tuner/engine/conditions.py 88.67% <ø> (ø)
keras_tuner/engine/tuner_utils.py 88.73% <80.00%> (-0.30%) ⬇️
keras_tuner/applications/resnet.py 97.18% <100.00%> (ø)
keras_tuner/applications/xception.py 87.09% <100.00%> (ø)
keras_tuner/engine/base_tuner.py 99.39% <100.00%> (ø)
...uner/engine/hyperparameters/hp_types/boolean_hp.py 100.00% <100.00%> (ø)
...tuner/engine/hyperparameters/hp_types/choice_hp.py 100.00% <100.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

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

Thanks for the update! After addressing these comments, it should be good to merge.

keras_tuner/distribute/oracle_chief_test.py Outdated Show resolved Hide resolved
keras_tuner/engine/oracle.py Show resolved Hide resolved
@Anselmoo Anselmoo force-pushed the Anselmoo/issue778_1 branch from a6440d0 to e094dc4 Compare December 10, 2022 09:56
Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

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

Looks all good! Thank you!

@haifeng-jin haifeng-jin merged commit 4f87243 into keras-team:master Dec 10, 2022
Anselmoo added a commit to Anselmoo/keras-tuner that referenced this pull request Dec 17, 2022
Fixes: keras-team#783

* test: ✏️ Removed `return`
   Fix also `return` issue as discussed keras-team#780 (comment)
Anselmoo added a commit to Anselmoo/keras-tuner that referenced this pull request Dec 17, 2022
Fixes: keras-team#783

* test: ✏️ Removed `return`
   Fix also `return` issue as discussed keras-team#780 (comment) 
* fix: ✏️ Correct link
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.

3 participants