• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ponder-lab / Hybridize-Functions-Refactoring / #3274
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: 9ad4fea94e0e87f5a5887fdaa82ed29d38add636
DEFAULT BRANCH: main
Ran 01 Oct 2026 03:36PM UTC
Jobs 1
Files 44
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Oct 2026 03:31PM UTC coverage: 87.131% (+0.05%) from 87.081%
#3274

push

github

web-flow
Decline hybridizing a custom-gradient method with a bound argument (#1006)

* Decline hybridizing a custom-gradient method with a bound argument

Under `tf.function`, `tf.custom_gradient` runs in graph mode and
converts every argument to a tensor, so an instance method's `self` or a
classmethod's `cls` raises. With `tf.function` beneath
`tf.custom_gradient` instead, the gradient function's return is
rejected. No decorator order works, so CONVERT_TO_HYBRID is declined
with the new IS_BOUND_CUSTOM_GRADIENT_METHOD (32), and an already-hybrid
such method is reported rather than reconfigured. A staticmethod and a
plain function have no bound argument and are still hybridized above
`tf.custom_gradient` (#996).

The test is structural, so it holds whether or not the analysis reaches
the method.

Fixes #1000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTnpjPjJj2aZy1ZkUD1eAn

* Report a bound custom-gradient method in place of the optimal verdict

With inference on, an already-hybrid bound custom-gradient method was
reported with both IS_BOUND_CUSTOM_GRADIENT_METHOD and
HAS_NO_PRIMITIVE_PARAMETERS. The latter is the already-optimal verdict,
which is false for a method whose decorator fails on every call, so the
bound method now reports in its place, as other operative failures in
that block do.

The predicate's Javadoc now names its known limits, and the fixture
comment no longer names an exception type the program doesn't raise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTnpjPjJj2aZy1ZkUD1eAn

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

25 of 25 new or added lines in 2 files covered. (100.0%)

4306 of 4942 relevant lines covered (87.13%)

0.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #3274.1 01 Oct 2026 03:36PM UTC 44
87.13
Source Files on build #3274
  • Tree
  • List 44
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2af6b9ad on github
  • Prev Build on gh-readonly-queue/main/pr-1001-064e560b05df313e16d1d35f471a787aaf290605
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc