flopscope-server
Server-side runtime for the flopscope client-server architecture.
flopscope-server runs the heavy NumPy-backed flopscope library on behalf of remote flopscope-client processes that connect over ZMQ + msgpack. Use it when you want to isolate untrusted or sandboxed code (typically participant submissions in the ARC Whitebox Estimation Challenge) from the actual computation environment.
When to install this
You want this on the server side of a client-server flopscope deployment. It pulls in flopscope, numpy, pyzmq, and msgpack:
pip install flopscope-server
Equivalent extra on the main flopscope distribution (installs both at the same exact version):
pip install "flopscope[server]"
Quick start
Launch the server
# Over a UNIX domain socket (recommended for local / single-host deployments)
python -m flopscope_server --url ipc:///tmp/flopscope.sock
# Or over TCP
python -m flopscope_server --url tcp://127.0.0.1:15555
Connect a client
In a separate process (typically a sandboxed container) that has flopscope-client installed:
export FLOPSCOPE_SERVER_URL=ipc:///tmp/flopscope.sock
import flopscope as flops
import flopscope.numpy as fnp
with flops.BudgetContext(flop_budget=1_000_000):
a = fnp.array([1.0, 2.0, 3.0])
b = fnp.array([4.0, 5.0, 6.0])
fnp.add(a, b)
flops.budget_summary()
The client's first request performs a version handshake with the server; mismatched flopscope versions raise ConnectionError with both versions in the message. Keep flopscope-server and flopscope-client on the same release.
Authoritative budget summaries
The server owns budget truth. Remote summary dictionaries are read-only snapshots with the same public schema and accounting meaning as local summaries. The global view covers the current server summary epoch. Peers must negotiate the authoritative-summary capability rather than silently accepting partial or zero-filled data.
WHEST's one-participant-process epoch is an evaluator deployment contract. A
conforming evaluator must start this server with --token-fd, keep the minted
token in its trusted control channel, perform a post-smoke, pre-scoring reset,
and couple every server replacement to participant-process replacement. This
excludes smoke work and prevents participant requests from resetting the epoch,
because the participant never receives the token. Without --token-fd, a
standalone local/development server intentionally permits lifecycle control
operations; tokenless mode is convenient for testing and is not a hardened
participant boundary.
Snapshots are assembled from incremental authoritative rollups in O(K) time
for the returned operation and optional namespace buckets, independent of
historical call count. The flat and namespaced forms share the same totals, and
formatted displays render the corresponding mapping. A summary request records
its own measured inspection overhead after taking the snapshot, so that work
appears in the next snapshot or a later final-close snapshot. The final close
response cannot recursively include its own post-boundary serialization.
A live client-owned context obtains its resource summary from the server. The client may replace only the four top-level timing fields to preserve that context's end-to-end timing meaning; those local measurements are never sent back and cannot affect authoritative FLOPs, operations, namespaces, budgets, the session summary, or scoring.
Architecture overview
┌─────────────────────────────┐ ZMQ + msgpack ┌──────────────────────────────┐
│ flopscope-client process │ ───────────────────────────▶ │ flopscope-server process │
│ (sandbox; no numpy) │ │ (full flopscope + numpy) │
│ `import flopscope as flops`│ ◀─────────────────────────── │ Executes ops, tracks budget │
└─────────────────────────────┘ └──────────────────────────────┘
Every counted operation (matmul, einsum, FFT, reductions, …) is dispatched to the server, executed against the real library, and the result + remaining budget streamed back. The client never sees numpy.
Related
flopscope— the NumPy-backed library hosted by this serverflopscope-client— the lightweight proxy clients use to talk to a flopscope-server- Documentation — full guides including client/server architecture and Docker recipes
- GitHub — source, CHANGELOG, contributor guide
License
Metadata
Release files for flopscope-server 0.12.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flopscope_server-0.12.4.tar.gz | 99.8 kB | With provenance | Details for flopscope_server-0.12.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flopscope_server-0.12.4-py3-none-any.whl | Python 3 | none | any | Details for flopscope_server-0.12.4-py3-none-any.whl |
Total release size: 133.7 kB
Release files / flopscope_server-0.12.4.tar.gz
| Download URL | flopscope_server-0.12.4.tar.gz |
|---|---|
| Size | 99.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4c8d5be6220d8e2c6b7ea522ceea78c2ce4decc7e53032e0427185e41cee325
|
|
BLAKE2b-256 checksum How to use checksums |
7095caa9d8072c6f08148b5f36fbf2bd5f1bd59f5dd66adce720093769ae461f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / flopscope_server-0.12.4-py3-none-any.whl
| Download URL | flopscope_server-0.12.4-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c858a94155972bde1620e98d8c862361326506aaae2403b6199a0fa8bee2f26
|
|
BLAKE2b-256 checksum How to use checksums |
e78b39c2078d0c8edb7971ef9107e875a67c655706e3a1f532ae15f273e46912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for flopscope-server 0.12.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flopscope_server-0.12.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.