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

ponder-lab / Hybridize-Functions-Refactoring / #3306
88%

Build:
DEFAULT BRANCH: main
Ran 02 Oct 2026 02:15AM UTC
Jobs 1
Files 45
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 11:00PM UTC coverage: 87.869% (+0.4%) from 87.481%
#3306

push

github

web-flow
Refuse a conversion that changes a guarded call's exception (#1021)

* Refuse a conversion that changes a guarded call's exception

A bare `@tf.function` traces a function with its argument's own shape and
dtype, and an operation whose static check fails on them raises at trace
time: `tf.matmul` of a rank-1 tensor raises `InvalidArgumentError` eagerly
and `ValueError` under the decorator. A guard that dispatches on the
exception, such as `assertRaises(tf.errors.InvalidArgumentError)` or
`except tf.errors.InvalidArgumentError`, then behaves differently. The
decorator alone makes this change, so the conversion is refused with
TRACING_CHANGES_GUARDED_EXCEPTION, with inference on or off.

A guard is an expected-failure context manager (#888) or an `except`
clause of a `try` statement whose body holds the call. The front end drops
a clause's classes, so they are read from the module's AST at the call's
line. A guarded call's argument is compared with what the calls outside
every guard pass: a type one of them passes traced cleanly, a new shape
predicts `ValueError`, a new dtype `TypeError`, and anything else either.
An expected-failure guard distinguishes when it may admit a `tf.errors`
class but not the predicted exception. `except` clauses distinguish when
the first to catch the predicted exception is not the first to catch a
kernel's error, in either direction. A `try` statement in the function's
own body around a call into TensorFlow or the program's code is refused on
its clauses alone.

Fixes #1014.

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

* Refuse a broad clause in the body, and read a guard for InvalidArgumentError

A `try` statement in the function's own body no longer runs around its
operations once the function is traced: an error the kernel raises, even
a data-dependent one, is raised when the graph runs, outside the
statement. So an out-of-range `tf.gather... (continued)

244 of 256 new or added lines in 6 files covered. (95.31%)

4766 of 5424 relevant lines covered (87.87%)

0.88 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
91.84
edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/ExceptionHandlerAnalysis.java
3
93.07
0.37% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
1
90.06
1.47% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/ExpectedFailureContextAnalysis.java
Jobs
ID Job ID Ran Files Coverage
1 #3306.1 02 Oct 2026 02:15AM UTC 45
87.87
Source Files on build #3306
  • Tree
  • List 45
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 33f92b02 on github
  • Prev Build on gh-readonly-queue/main/pr-1007-50577a78faebe598f58c8dbdc1365cd2ce68fa21
  • Next Build on main
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