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

kubernetes-sigs / inference-perf / 38476258500
86%

Build:
DEFAULT BRANCH: main
Ran 13 Oct 2026 10:23PM UTC
Jobs 1
Files 135
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

13 Oct 2026 10:13PM UTC coverage: 83.258% (+0.2%) from 83.073%
38476258500

push

github

web-flow
Add `numeric/expression` (#563)

Adds `utils/numeric/expression`: an `Expression` type that turns a
numeric config knob written as a string into an object parsed and
validated once at construction, then sampled cheaply many times, plus
`Predicate`, its boolean counterpart for stop conditions.

## Motivation

Numeric config knobs today are fixed scalars or structured
`Distribution` configs. There is no compact way to express time-varying
load shapes (ramps, sinusoids, bursts) or ad-hoc randomness, and every
new shape means new config surface. One string grammar covers all three
and their combinations:

- constants: `"3.5"`
- functions of stage time: `"10 + 5*sin(2*pi*t/60)"`
- draws from any `sympy.stats` distribution: `"Normal(512, 200)"`, `"100
+ 50*Normal(0, 1)"`

Each call site decides which ingredients are permitted (`allow_time`,
`allow_random`) and may bound the range, so a request-rate knob can
forbid negatives. `Expression` complements `numeric.distribution` rather
than replacing it.

## Change structure

`inference_perf/utils/numeric/expression/expression.py`:

- **Distribution discovery**: every `sympy.stats` constructor is found
at import and bound without a name argument; unique generated names keep
repeated draws independent.
- **`Expression.__init__`**: parse, reject unknown functions, enforce
`allow_time` / `allow_random`, resolve the range policy, precompile the
sampler; config errors raise `ValueError` at load time.
- **Range validation**: proved statically when possible. Bounds assert
by default; `clip=True` opts random draws into truncation.
- **`sample(t, rng, size)`**: random leaves sampled through sympy's
numpy registry (guarded import, symbolic fallback) around a lambdified
deterministic skeleton.
- **`evaluate(t)`**: a deterministic expression over an array of times
in one lambdified call. `sample(t=...)` is too slow to integrate a rate.
First caller: `RateSchedule` in #829.
- **`bounds`**: provable `(lower, upper)` by interval... (continued)

328 of 365 new or added lines in 1 file covered. (89.86%)

12045 of 14467 relevant lines covered (83.26%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
37
89.86
inference_perf/utils/numeric/expression/expression.py
Jobs
ID Job ID Ran Files Coverage
1 38476258500.1 13 Oct 2026 10:23PM UTC 135
83.26
GitHub Action Run
Source Files on build 38476258500
  • Tree
  • List 135
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38476258500
  • 7b4246af on github
  • Prev Build on main (#38465571840)
  • Next Build on main (#38598280858)
  • Delete
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