-
Notifications
You must be signed in to change notification settings - Fork 118
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
Makes ops.split
in torch consistent with other backends
#914
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #914 +/- ##
==========================================
- Coverage 83.63% 79.83% -3.80%
==========================================
Files 318 318
Lines 28391 28591 +200
Branches 5409 5447 +38
==========================================
- Hits 23745 22827 -918
- Misses 3147 4297 +1150
+ Partials 1499 1467 -32
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Thanks for the fix!
keras_core/backend/torch/numpy.py
Outdated
return torch.split( | ||
if dim % indices_or_sections != 0: | ||
raise ValueError( | ||
"`indices_or_sections` is given as an integar, but it cannot " |
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.
Typo: integer
Use the following:
Received indices_or_sections={indices_or_sections}
(interpreted as a number of sections) and axis={axis},
but input dimension x.shape[{axis}]={x.shape[axis]}
is not divisible by {indices_or_sections}.
Full input shape: x.shape={x.shape}
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.
Thanks! Fixed.
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.
LGTM
The JAX CI failure seems persistent, despite not occurring with local testing and having no clear connection to the commit where it started failing. We'll investigate it. There's something weird going on.
I could not reproduce these JAX CI failure in my local env, too. It appears that this run has started to fail: |
Fixes #544
Unit test has been updated to verify the behavior consistency across backends.