Skip to main content

Code-generation plugin for InferenceBench Suite (HumanEval-style execution-based scoring).

Project description

inferencebench-code

Code-generation plugin for the InferenceBench Suite.

HumanEval-style execution-based benchmarks: the plugin sends a function-signature prompt to the model, extracts the Python code from its response, executes it against bundled unit tests in a subprocess, and reports pass_at_1.

Suite ID: code.generation

Bundled benchmarks:

  • code.generation.humaneval-mini — 5 stdlib-only Python tasks, pass_at_1 scoring with a 5-second per-task wall-clock timeout.

SAFETY WARNING — read before running

This plugin executes model-generated code. Every run prints a yellow banner reminding you of that. The execution layer is best-effort defence-in-depth, not a real sandbox:

  • Each task's solution + tests are written to a temp file and invoked with python -I (isolated mode) under a subprocess.run(timeout=...) wall clock.
  • A cheap substring pre-scan refuses any solution that imports subprocess, os.system, socket, urllib, multiprocessing, or ctypes.
  • The bundled fixtures are stdlib-only, no I/O, no network.

This is deliberately not airtight. Phase 2 adds real isolation (firejail / nsjail / container-per-task). Until then: only run code-generation benchmarks against models you trust, on machines you can afford to throw away, and never against the bundled fixtures replaced with untrusted input.

Metrics

The envelope's metrics block includes:

Metric Direction Meaning
pass_at_1 higher is better mean of per-task passed booleans
pass_at_1_p05/50/95 higher is better bootstrap quantiles of per-sample scores
timeout_rate lower is better fraction of tasks that hit the wall clock
ttft_p50_ms - model time-to-first-token, median
total_p50_ms - model total request time, median
tokens_out_total - total generated tokens across the run
ok_rate - fraction of model calls that succeeded
n_samples - fixture row count

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inferencebench_code-0.1.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inferencebench_code-0.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file inferencebench_code-0.1.0.tar.gz.

File metadata

  • Download URL: inferencebench_code-0.1.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for inferencebench_code-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68f5703def5b02cfe5695f18069f5173121d06d6afbf4e92ed0a12e5181dcf29
MD5 4cdbfa1b81df131e10b91b15e55bc97b
BLAKE2b-256 68a02edcfb5a327529985832e7fc7c8352bba8055478c443f77ad512e10d979b

See more details on using hashes here.

File details

Details for the file inferencebench_code-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: inferencebench_code-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for inferencebench_code-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d5b840d2e59b57b1d473116c153ae94820b2d8d8f5ddc3f88cd75fb707f7ca
MD5 8c5d6cb9460637f964aa3429e347897e
BLAKE2b-256 c8c3406e5fac833fcb246dec4942a1c310b328767f65d9b7f37bbfd8893203ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page