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
Fixes for reference before assignment… #18640
base: master
Are you sure you want to change the base?
Fixes for reference before assignment… #18640
Conversation
Thanks for the PR. Unit tests are failing and the value-add of most of these changes is highly questionable (most of it is unreachable code which will only serve to decrease our coverage). Please double check each change and only keep the useful ones. |
keras/optimizers/base_optimizer.py
Outdated
@@ -602,6 +602,8 @@ def get_config(self): | |||
learning_rate = serialization_lib.serialize_keras_object( | |||
self._learning_rate | |||
) | |||
else: | |||
learning_rate = 0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this should be?
…Close` from `test_tf_data_compatibility` ; [keras/{ops/numpy.py,saving/saving_lib.py}] `black`en
@fchollet Hmm ok I'll see what's causing these segfaults. In the meantime a lot of the patches are to solve the traceability problem, i.e., guarantee that the - for output in ds.take(1):
- output = output.numpy()
+ output = next(iter(ds)).numpy() Should I change the PR to just that fix, and make separate PR(s) for the other cases? |
Hi @SamuelMarks Can you please resolve conflicts? Thank you! |
# Conflicts: # keras/layers/preprocessing/center_crop_test.py # keras/layers/preprocessing/random_crop_test.py # keras/layers/preprocessing/random_rotation_test.py # keras/layers/preprocessing/random_zoom_test.py # keras/layers/preprocessing/resizing_test.py
@gbaned - Sure thing. Done. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18640 +/- ##
==========================================
- Coverage 78.38% 75.93% -2.45%
==========================================
Files 498 498
Lines 45520 45530 +10
Branches 8393 8388 -5
==========================================
- Hits 35679 34572 -1107
- Misses 8102 9131 +1029
- Partials 1739 1827 +88
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…rop_test,random_crop_test} ops/operation}.py] Resolve issues found through `flake8 --config setup.cfg .`
Hi @SamuelMarks Can you please resolve conflicts? Thank you! |
# Conflicts: # keras/ops/nn.py
@gbaned Done |
@SamuelMarks , Can you please rebase the code to the latest code structure, eg: |
# Conflicts: # examples/keras_io/timeseries/timeseries_weather_forecasting.py # keras/layers/preprocessing/category_encoding_test.py # keras/layers/preprocessing/discretization_test.py # keras/layers/preprocessing/random_brightness_test.py # keras/src/layers/preprocessing/category_encoding.py # keras/src/ops/operation.py # keras/src/ops/operation_utils.py # keras/src/trainers/epoch_iterator.py
@sachinprasadhs No problem. Merged and resolved conflicts. |
found through static analysis tooling
(more to go; or you can merge now and await further PRs; or you can request I move this to one PR per file or per module)