fuzzybits-server 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fuzzybits_server/.dockerignore +64 -0
- fuzzybits_server/__init__.py +15 -0
- fuzzybits_server/app.py +93 -0
- fuzzybits_server/config.py +310 -0
- fuzzybits_server/convergence/__init__.py +100 -0
- fuzzybits_server/convergence/gbas.py +229 -0
- fuzzybits_server/convergence/metrics.py +164 -0
- fuzzybits_server/convergence/policies.py +387 -0
- fuzzybits_server/convergence/runner.py +398 -0
- fuzzybits_server/convergence/sampling.py +409 -0
- fuzzybits_server/convergence/special.py +280 -0
- fuzzybits_server/convergence/tally.py +179 -0
- fuzzybits_server/event_hub.py +58 -0
- fuzzybits_server/event_log.py +16 -0
- fuzzybits_server/fault_tree_payload.py +899 -0
- fuzzybits_server/model_oracle_p.json +44 -0
- fuzzybits_server/native.py +536 -0
- fuzzybits_server/routes.py +408 -0
- fuzzybits_server/state.py +67 -0
- fuzzybits_server/supervisor.py +193 -0
- fuzzybits_server/ui.py +84 -0
- fuzzybits_server/webui/.vite/manifest.json +26 -0
- fuzzybits_server/webui/assets/Playground-B6V8NzhX.css +1 -0
- fuzzybits_server/webui/assets/Playground-CSpFbzwZ.js +5481 -0
- fuzzybits_server/webui/assets/Playground-CSpFbzwZ.js.map +1 -0
- fuzzybits_server/webui/assets/index-BnegRRhI.css +1 -0
- fuzzybits_server/webui/assets/index-C3oGCBE0.js +13 -0
- fuzzybits_server/webui/assets/index-C3oGCBE0.js.map +1 -0
- fuzzybits_server/webui/index.html +24 -0
- fuzzybits_server/worker.py +64 -0
- fuzzybits_server-0.17.0.dist-info/METADATA +281 -0
- fuzzybits_server-0.17.0.dist-info/RECORD +34 -0
- fuzzybits_server-0.17.0.dist-info/WHEEL +4 -0
- fuzzybits_server-0.17.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
|
|
6
|
+
<meta
|
|
7
|
+
name="description"
|
|
8
|
+
content="Compile an OpenPSA/MEF fault tree to a PDAG and sample the top event. Monte Carlo estimate with a confidence interval."
|
|
9
|
+
/>
|
|
10
|
+
<title>fuzzybits</title>
|
|
11
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
12
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
13
|
+
<link
|
|
14
|
+
rel="stylesheet"
|
|
15
|
+
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=IBM+Plex+Mono:wght@300;400;500&family=Inter+Tight:wght@400;500;600;700&display=swap"
|
|
16
|
+
/>
|
|
17
|
+
<meta name="color-scheme" content="light" />
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-C3oGCBE0.js"></script>
|
|
19
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BnegRRhI.css">
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<div id="root"></div>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""Subprocess entry point for mcSCRAM probability calculations.
|
|
2
|
+
|
|
3
|
+
By default the convergence loop and all statistics run **on the host in Python**
|
|
4
|
+
(:mod:`fuzzybits_server.convergence`); the native engine is used only to produce
|
|
5
|
+
raw per-pass popcounts. Set ``MCSCRAM_CONVERGENCE_ENGINE=native`` to fall back
|
|
6
|
+
to the legacy in-engine C++ convergence loop (``fuzzybits.native().run_probability``).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import multiprocessing as mp
|
|
12
|
+
import os
|
|
13
|
+
import time
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
from fuzzybits_server.config import CalculationConfig
|
|
17
|
+
from fuzzybits_server.convergence import run_calculation
|
|
18
|
+
from fuzzybits_server.event_log import emit
|
|
19
|
+
from fuzzybits_server.native import format_native_exception, run_probability_call
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _convergence_engine() -> str:
|
|
23
|
+
return os.getenv("MCSCRAM_CONVERGENCE_ENGINE", "python").strip().lower()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def calculation_main(config: CalculationConfig, events: mp.Queue) -> None:
|
|
27
|
+
sequence = 0
|
|
28
|
+
engine = _convergence_engine()
|
|
29
|
+
emit(
|
|
30
|
+
"calculation_started",
|
|
31
|
+
input_files=config.input_files,
|
|
32
|
+
options=config.options,
|
|
33
|
+
engine=engine,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def on_progress(update: dict[str, Any]) -> None:
|
|
37
|
+
nonlocal sequence
|
|
38
|
+
sequence += 1
|
|
39
|
+
message = {
|
|
40
|
+
"sequence": sequence,
|
|
41
|
+
"timestamp": time.time(),
|
|
42
|
+
"update": update,
|
|
43
|
+
}
|
|
44
|
+
emit("progress", **message)
|
|
45
|
+
events.put({"type": "progress", **message})
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
if engine == "native":
|
|
49
|
+
result = run_probability_call(config.input_files, config.options, on_progress)
|
|
50
|
+
else:
|
|
51
|
+
result = run_calculation(
|
|
52
|
+
config.input_files,
|
|
53
|
+
config.options,
|
|
54
|
+
on_progress,
|
|
55
|
+
pcfb_path=config.pcfb_path,
|
|
56
|
+
)
|
|
57
|
+
except BaseException as exc:
|
|
58
|
+
error = format_native_exception(exc)
|
|
59
|
+
emit("calculation_failed", error=error)
|
|
60
|
+
events.put({"type": "failed", "error": error})
|
|
61
|
+
return
|
|
62
|
+
|
|
63
|
+
emit("calculation_completed", result=result)
|
|
64
|
+
events.put({"type": "completed", "result": result})
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: fuzzybits-server
|
|
3
|
+
Version: 0.17.0
|
|
4
|
+
Summary: FastAPI server: compile OpenPSA/MEF fault trees to .pcfb and sample the top event.
|
|
5
|
+
Project-URL: Homepage, https://github.com/fuzzybit-org/fuzzybits
|
|
6
|
+
Project-URL: Issues, https://github.com/fuzzybit-org/fuzzybits/issues
|
|
7
|
+
Author: fuzzybit-org
|
|
8
|
+
License: AGPL-3.0-or-later
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Requires-Dist: fastapi>=0.115
|
|
11
|
+
Requires-Dist: fuzzybits==0.17.0
|
|
12
|
+
Requires-Dist: numpy>=2.4.6
|
|
13
|
+
Requires-Dist: platformdirs>=4.0
|
|
14
|
+
Requires-Dist: scipy>=1.17.1
|
|
15
|
+
Requires-Dist: uvicorn[standard]>=0.30
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
SPDX-FileCopyrightText: 2026 fuzzybit-org
|
|
23
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
24
|
+
-->
|
|
25
|
+
|
|
26
|
+
# tools/server
|
|
27
|
+
|
|
28
|
+
AGPL-3.0-or-later. Imported from `fuzzybit-org/fuzzybits-bench` (`src/server`)
|
|
29
|
+
with history. Compiles OpenPSA/MEF **fault trees** to `.pcfb` (once per
|
|
30
|
+
source SHA-256s and compile options) and samples the **top event** through
|
|
31
|
+
`fuzzybits.Session`. Wald / Bayes / GBAS stopping. Event-tree sequences and
|
|
32
|
+
end states are not compiled or sampled ([#92](https://github.com/fuzzybit-org/fuzzybits/issues/92)).
|
|
33
|
+
Set `FUZZYBITS_SERVER_ENGINE=legacy` for the in-memory `run_compile` path.
|
|
34
|
+
The `MCSCRAM_CONVERGENCE_ENGINE=native` `run_probability` fallback is unchanged.
|
|
35
|
+
|
|
36
|
+
## Run
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
cd tools/server
|
|
40
|
+
uv sync --extra dev --no-install-package fuzzybits
|
|
41
|
+
uv run --no-sync fuzzybits-server --data-dir ../../input/Aralia
|
|
42
|
+
uv run --no-sync fuzzybits-server --no-ui # headless API; GET / is a JSON pointer to /api/v1
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
CLI defaults to `127.0.0.1:8000`. Flags: `--host`, `--port`, `--data-dir`,
|
|
46
|
+
`--cache-dir` (platformdirs), `--backend auto|cuda|omp|metal`,
|
|
47
|
+
`--engine pcfb|legacy`, `--no-ui`, `--open`.
|
|
48
|
+
|
|
49
|
+
Compile / sampling endpoints need the native module. The published
|
|
50
|
+
`fuzzybits-server` wheel depends on `fuzzybits==0.17.0`. Until that engine
|
|
51
|
+
wheel is on PyPI ([#36](https://github.com/fuzzybit-org/fuzzybits/issues/36)),
|
|
52
|
+
`uv.lock` resolves it from this checkout's static metadata and CI/Docker skip
|
|
53
|
+
installing it (`uv sync --no-install-package fuzzybits`) so the runtime image
|
|
54
|
+
or a locally built wheel can supply the engine:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uv pip install ../../dist/fuzzybits-*.whl
|
|
58
|
+
python -c "import fuzzybits; print(fuzzybits.__file__, fuzzybits.list_devices())"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Without the wheel the process still starts: `/api/v1/healthz` works, model
|
|
62
|
+
listing is empty, and native compile returns an install error instead of
|
|
63
|
+
aborting the interpreter.
|
|
64
|
+
|
|
65
|
+
### PyPI wheel
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install fuzzybits-server
|
|
69
|
+
fuzzybits-server --data-dir ./models
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The wheel is `py3-none-any` and bundles the CSR playground. Build contract
|
|
73
|
+
(from a clean checkout, after the UI is built):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
export COPYFILE_DISABLE=1 # macOS: keep AppleDouble files out of archives
|
|
77
|
+
(cd tools/server/webui && npm ci && npm run build) && (cd tools/server && uv build --wheel --out-dir ../../dist-server)
|
|
78
|
+
# -> dist-server/fuzzybits_server-0.17.0-py3-none-any.whl
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
An sdist is optional; if produced, it includes `webui/dist` so building a
|
|
82
|
+
wheel from the sdist does not need Node.
|
|
83
|
+
|
|
84
|
+
## Test
|
|
85
|
+
|
|
86
|
+
The imported pytest suite is pure Python (BernoulliSampler, numpy, scipy)
|
|
87
|
+
plus config/cache helpers. It does not import `fuzzybits` unless a
|
|
88
|
+
test is marked `@pytest.mark.native`.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cd tools/server
|
|
92
|
+
uv sync --frozen --extra dev --no-install-package fuzzybits
|
|
93
|
+
uv run --no-sync pytest -m "not native"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Mark future engine tests `@pytest.mark.native`. `tests/conftest.py` skips
|
|
97
|
+
them when the wheel is absent.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## UI
|
|
101
|
+
|
|
102
|
+
CSR build in `webui/`, served by FastAPI at `/` (SPA fallback, hashed
|
|
103
|
+
`/assets/*` with long cache). Same-origin `/api/v1` and `/api/v1/ws`. No Node
|
|
104
|
+
at runtime. The UI catalogs XML, draws the first `define-fault-tree`, compiled
|
|
105
|
+
PDAG, and kernel DAG, and streams the top-event estimate.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cd tools/server/webui
|
|
109
|
+
npm ci
|
|
110
|
+
npm run typecheck
|
|
111
|
+
npm run build # CSR assets → dist/
|
|
112
|
+
npm run dev # Vite + proxy to FUZZYBITS_SERVER_URL (default :8000)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
| Variable | Role | Default |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| `FUZZYBITS_SERVER_UI` | `1` serve UI, `0`/`--no-ui` disable | `1` |
|
|
118
|
+
| `FUZZYBITS_SERVER_UI_DIR` | Directory with `index.html` + `assets/` | packaged `fuzzybits_server/webui`, else `tools/server/webui/dist` |
|
|
119
|
+
|
|
120
|
+
With the UI disabled, `GET /` returns `{"service":"fuzzybits-server","api":"/api/v1","ui":false}`.
|
|
121
|
+
When `FUZZYBITS_SERVER_UI_DIR` is unset the server uses the copy bundled in
|
|
122
|
+
the wheel (`importlib.resources`), then `tools/server/webui/dist` for a
|
|
123
|
+
source checkout or the Docker image.
|
|
124
|
+
|
|
125
|
+
## Data (Aralia XML + optional bench CSVs)
|
|
126
|
+
|
|
127
|
+
Public OpenPSA/Aralia models live in this repo at `input/Aralia/*.xml`.
|
|
128
|
+
Historical `compiler.csv` / `convergence.csv` stay in fuzzybits-bench
|
|
129
|
+
(CC BY-SA 4.0) and are optional. Point the server at a data root:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
export FUZZYBITS_SERVER_DATA_DIR=/path/to/data
|
|
133
|
+
# docker: mount this repo's models (CSVs optional)
|
|
134
|
+
# -v $PWD/input/Aralia:/data/Aralia
|
|
135
|
+
# -e FUZZYBITS_SERVER_DATA_DIR=/data
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
| Path under `$FUZZYBITS_SERVER_DATA_DIR` | Used for |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `compiler.csv`, `convergence.csv` | Optional run tables (`optional_table_path`) |
|
|
141
|
+
| `*.xml`, `Aralia/`, `input/`, `input/Aralia/` | Model catalog (`GET /api/v1/model/xml-inputs`) |
|
|
142
|
+
| `SmallTree.xml` or `input/SmallTree/SmallTree.xml` | Default `MCSCRAM_INPUT_FILES` when that env is unset |
|
|
143
|
+
|
|
144
|
+
`MCSCRAM_ARALIA_INPUT_DIR` still overrides the XML search. If neither env is
|
|
145
|
+
set and `/app/input` is missing, the catalog is empty and the server stays up.
|
|
146
|
+
|
|
147
|
+
## Env
|
|
148
|
+
|
|
149
|
+
| Variable | Role |
|
|
150
|
+
| --- | --- |
|
|
151
|
+
| `FUZZYBITS_SERVER_DATA_DIR` | Bench data mount (CSVs + XML) |
|
|
152
|
+
| `FUZZYBITS_SERVER_ENGINE` | `pcfb` (default) or `legacy` in-memory PDAG |
|
|
153
|
+
| `FUZZYBITS_SERVER_CACHE_DIR` | Directory for compiled / uploaded `.pcfb` files |
|
|
154
|
+
| `MCSCRAM_ARALIA_INPUT_DIR` | Extra XML search root |
|
|
155
|
+
| `MCSCRAM_INPUT_FILES` | Explicit model path(s), comma/colon separated |
|
|
156
|
+
| `MCSCRAM_WATCH` | Boolean watch-mode **or** comma-separated MEF names / PDAG indices to tally |
|
|
157
|
+
| `MCSCRAM_WATCH_NODES` | Extra comma-separated watch names (same identification as `MCSCRAM_WATCH`) |
|
|
158
|
+
| `MCSCRAM_AUTOSTART` | Start sampling on boot (default false) |
|
|
159
|
+
| `HOST` / `PORT` / `LOG_LEVEL` | uvicorn |
|
|
160
|
+
|
|
161
|
+
Sampling knobs (`MCSCRAM_NUM_TRIALS`, `MCSCRAM_POLICY`, …) are unchanged.
|
|
162
|
+
|
|
163
|
+
## `.pcfb` upload
|
|
164
|
+
|
|
165
|
+
`POST /api/v1/model/pcfb` accepts a raw `.pcfb` body (`Content-Type:
|
|
166
|
+
application/octet-stream`). The server validates with `fuzzybits.inspect`
|
|
167
|
+
(`pcfb::validate` diagnostics). Invalid circuits return HTTP 400:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{"detail": {"error": "...", "diagnostics": [...], "inspect": {...}}}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Success:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{"id": "<sha256>", "pcfb_id": "<sha256>", "path": "...", "inspect": {...}}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Start a run on the uploaded circuit:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
curl -sS -X POST "$HOST/api/v1/model/pcfb" \
|
|
183
|
+
-H "Content-Type: application/octet-stream" \
|
|
184
|
+
--data-binary @model.pcfb
|
|
185
|
+
curl -sS -X POST "$HOST/api/v1/start" \
|
|
186
|
+
-H "Content-Type: application/json" \
|
|
187
|
+
-d '{"pcfb_id":"<sha256>","watch":["g1"]}'
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`GET /api/v1/model/{dag,kernel-dag,sample-shape,execution-plan,dag-bundle}`
|
|
191
|
+
accept `?pcfb_id=<sha256>` to serve those views from the stored circuit
|
|
192
|
+
instead of compiling MEF.
|
|
193
|
+
|
|
194
|
+
## Image
|
|
195
|
+
|
|
196
|
+
`ghcr.io/fuzzybit-org/fuzzybits-server` is `FROM` the slim runtime image
|
|
197
|
+
(`ghcr.io/fuzzybit-org/fuzzybits-runtime:nightly-generic` by default;
|
|
198
|
+
`scram-cli`, `fzb`, AdaptiveCpp, pip-installed `fuzzybits`). uv installs
|
|
199
|
+
this package into a venv with `--system-site-packages` so the engine is not
|
|
200
|
+
rebuilt. Variants match the runtime: `generic` (default) and `cuda12.8-sm70`.
|
|
201
|
+
|
|
202
|
+
Tags (same scheme as `fuzzybits-runtime`): `ci-<sha12>-<variant>` on `ci/**`,
|
|
203
|
+
`nightly-<variant>` + `sha-<sha12>-<variant>` on `develop`, `vX.Y.Z-<variant>`
|
|
204
|
+
on release tags.
|
|
205
|
+
|
|
206
|
+
The image runs as non-root `coder`. Default env:
|
|
207
|
+
|
|
208
|
+
| Variable | Image default |
|
|
209
|
+
| --- | --- |
|
|
210
|
+
| `FUZZYBITS_SERVER_DATA_DIR` | `/data` |
|
|
211
|
+
| `FUZZYBITS_SERVER_CACHE_DIR` | `/home/coder/.cache/fuzzybits/server` |
|
|
212
|
+
| `ACPP_APPDB_DIR` | `/home/coder/.cache/fuzzybits/acpp` |
|
|
213
|
+
| `ACPP_VISIBILITY_MASK` | `omp` |
|
|
214
|
+
| `HOST` / `PORT` | `0.0.0.0` / `8000` |
|
|
215
|
+
|
|
216
|
+
Volumes: `/data` (models) and `/home/coder/.cache/fuzzybits` (JIT + `.pcfb` cache).
|
|
217
|
+
`HEALTHCHECK` hits `/api/v1/healthz`.
|
|
218
|
+
|
|
219
|
+
### `docker run`
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
IMG=ghcr.io/fuzzybit-org/fuzzybits-server:nightly-generic
|
|
223
|
+
|
|
224
|
+
# CPU (OpenMP)
|
|
225
|
+
docker run --rm -p 8000:8000 \
|
|
226
|
+
-e ACPP_VISIBILITY_MASK=omp \
|
|
227
|
+
-v "$PWD/input/Aralia:/data/Aralia:ro" \
|
|
228
|
+
-v fuzzybits-cache:/home/coder/.cache/fuzzybits \
|
|
229
|
+
"$IMG"
|
|
230
|
+
|
|
231
|
+
# GPU (NVIDIA device N). Use the cuda12.8-sm70 tag on Volta (sm_70);
|
|
232
|
+
# generic SSCP covers other NVIDIA GPUs.
|
|
233
|
+
docker run --rm --gpus device=0 -p 8000:8000 \
|
|
234
|
+
-e ACPP_VISIBILITY_MASK=cuda \
|
|
235
|
+
-v "$PWD/input/Aralia:/data/Aralia:ro" \
|
|
236
|
+
-v fuzzybits-cache:/home/coder/.cache/fuzzybits \
|
|
237
|
+
ghcr.io/fuzzybit-org/fuzzybits-server:nightly-cuda12.8-sm70
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
xerxes mapping: `--gpus device=0` is the Tesla V100S, `device=1` is the RTX 3070.
|
|
241
|
+
Hosted CI smokes CPU only (`ACPP_VISIBILITY_MASK=omp`).
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
curl -sS http://127.0.0.1:8000/api/v1/healthz
|
|
245
|
+
curl -sS http://127.0.0.1:8000/api/v1/model/xml-inputs
|
|
246
|
+
curl -sS -X POST http://127.0.0.1:8000/api/v1/start \
|
|
247
|
+
-H "Content-Type: application/json" \
|
|
248
|
+
-d '{"model_id":"chinese","num_trials":1e7,"early_stop":false}'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
E2E helper (compile chinese + das9201, check \|z\|≤4 vs BDD refs, POST a
|
|
252
|
+
`fzb compile` `.pcfb`):
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
tools/server/scripts/e2e-smoke.sh "$IMG"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Compose
|
|
259
|
+
|
|
260
|
+
```yaml
|
|
261
|
+
services:
|
|
262
|
+
server:
|
|
263
|
+
image: ghcr.io/fuzzybit-org/fuzzybits-server:nightly-generic
|
|
264
|
+
ports: ["8000:8000"]
|
|
265
|
+
environment:
|
|
266
|
+
ACPP_VISIBILITY_MASK: omp # cuda on GPU hosts
|
|
267
|
+
HOST: "0.0.0.0"
|
|
268
|
+
PORT: "8000"
|
|
269
|
+
volumes:
|
|
270
|
+
- ../../input/Aralia:/data/Aralia:ro
|
|
271
|
+
- fuzzybits-cache:/home/coder/.cache/fuzzybits
|
|
272
|
+
# gpus: ["device=0"] # NVIDIA: also set ACPP_VISIBILITY_MASK=cuda
|
|
273
|
+
healthcheck:
|
|
274
|
+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/v1/healthz')"]
|
|
275
|
+
interval: 15s
|
|
276
|
+
timeout: 5s
|
|
277
|
+
retries: 3
|
|
278
|
+
|
|
279
|
+
volumes:
|
|
280
|
+
fuzzybits-cache:
|
|
281
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
fuzzybits_server/.dockerignore,sha256=50Un8-dRVRK4HVk3S3Xls2LcGD9ih6odlDMvdTX7qbs,647
|
|
2
|
+
fuzzybits_server/__init__.py,sha256=kOOntkaiqj0XAaasdlFbXB_xCQbUcDC-Jpr_4fs0hpg,400
|
|
3
|
+
fuzzybits_server/app.py,sha256=grIsvQzgW_Q-5yz34iWAdQ9KT6LuEeXlH_Vla9KdLmw,2575
|
|
4
|
+
fuzzybits_server/config.py,sha256=XtlGhbADe0bHV6XfL-LtMydAngQ05ddN5g_JcDw86yc,10957
|
|
5
|
+
fuzzybits_server/event_hub.py,sha256=Hkc-l1DWrux7_DX08rMbSI0Cz357ibs4k-O41HL_0bg,1856
|
|
6
|
+
fuzzybits_server/event_log.py,sha256=BQzEH12u1cAJorcUQXGLxuIpSTjmoilqKTiIes7Y9R8,381
|
|
7
|
+
fuzzybits_server/fault_tree_payload.py,sha256=ONBYDBIMkupByto1rEbsIoa3SEXCr8_XacPQikyWw5s,31859
|
|
8
|
+
fuzzybits_server/model_oracle_p.json,sha256=WrGhuoc-y7aDctOCQ6SkvddFe7hWR1GXLS0GA9GdBiQ,1129
|
|
9
|
+
fuzzybits_server/native.py,sha256=evphq0sdxuGDGD1eIXJmooHdXiKm9Sqn0CH_mQgrfto,17647
|
|
10
|
+
fuzzybits_server/routes.py,sha256=0BW6VhYUiNUt6B1D2SYL7xoyH3Uff6_C_9_NFh3WC6g,18155
|
|
11
|
+
fuzzybits_server/state.py,sha256=iEjuLs1_idzG4cToKTGUS40xWK7JsrKijp0xVcpoTAk,2169
|
|
12
|
+
fuzzybits_server/supervisor.py,sha256=YJF3TOIf8rpy4gg0A2VYRDNI6COu1d8wXB_4bBAi8yY,7283
|
|
13
|
+
fuzzybits_server/ui.py,sha256=59EOHO4PTXFFR1GoFzd1qiFLLd6KCcS0YddP5T0bKBQ,2621
|
|
14
|
+
fuzzybits_server/worker.py,sha256=ELPI-EGwLXCxK7Knz5FyJbId4c6dScQXlBSXnoVFz4k,2094
|
|
15
|
+
fuzzybits_server/convergence/__init__.py,sha256=znxpJUqBZziDQvTBNsMDNemkXJFXhlvGJm10yFRe_VI,2641
|
|
16
|
+
fuzzybits_server/convergence/gbas.py,sha256=9oRw66SFfyH4K07GQH-psnGLaJ5RQZk6i3D6lYy2t28,9080
|
|
17
|
+
fuzzybits_server/convergence/metrics.py,sha256=1BFpJ2THmCJWbQbats0zG6fwL5TERNkFopKWUGnDrMY,5967
|
|
18
|
+
fuzzybits_server/convergence/policies.py,sha256=YJjGyHMa_Io-1bYlV4ayZzBHInKLD7bGF9HFloHbDo0,14908
|
|
19
|
+
fuzzybits_server/convergence/runner.py,sha256=QakMJduJvCqI_fmlAi84IRkNXiHGo3XakbuSrke-C3Y,15384
|
|
20
|
+
fuzzybits_server/convergence/sampling.py,sha256=57CAWhDmlXQuwFYZIxbRXpX4VAIqfUVYog8_Ky7Vdsk,14302
|
|
21
|
+
fuzzybits_server/convergence/special.py,sha256=dOsjR0ckC2i7nz63_FnNv6Ud44yyc_t3m-RlQCYh5GM,9136
|
|
22
|
+
fuzzybits_server/convergence/tally.py,sha256=oc6d70YsAZVeOxjHZgSpOstsVci7o6S_wzUiZJ8htQ4,5974
|
|
23
|
+
fuzzybits_server/webui/index.html,sha256=30g36Zl1Y1b46nITUl9CTUbcerwRI4wbEXNVEBc25PY,1093
|
|
24
|
+
fuzzybits_server/webui/.vite/manifest.json,sha256=8GYEbLEOXVdDi0B9q6pruM77Q-vSv_rs_ritomJJwZ4,567
|
|
25
|
+
fuzzybits_server/webui/assets/Playground-B6V8NzhX.css,sha256=o9LdO8ea4Xh4yh88TLC3fFDSO_5sbiozFBh4agzAK9M,30739
|
|
26
|
+
fuzzybits_server/webui/assets/Playground-CSpFbzwZ.js,sha256=DNjpPX5irCrOwk2Y52AgMKJ8hs0ZtSC69nt8wGW6qtk,1367975
|
|
27
|
+
fuzzybits_server/webui/assets/Playground-CSpFbzwZ.js.map,sha256=9j4g10HbxIXvvULhu3-9gfLYZ7XN5HJQ5ETr3Cj9SqY,5309688
|
|
28
|
+
fuzzybits_server/webui/assets/index-BnegRRhI.css,sha256=PFaOoUWghDs9yWg2Ng3KAyVzL7e3y1y5xD2kWa2oSQM,43547
|
|
29
|
+
fuzzybits_server/webui/assets/index-C3oGCBE0.js,sha256=YxXRce2Pwdkg0sHYUSp0H3M2EsCLWtNTqunn520eokY,277594
|
|
30
|
+
fuzzybits_server/webui/assets/index-C3oGCBE0.js.map,sha256=JnPnmE2yMtsmWRYpUmZnsoTNp4ougbYp5mNl3yjG7Ro,1586955
|
|
31
|
+
fuzzybits_server-0.17.0.dist-info/METADATA,sha256=aokdsECZ6K9W8sw6ivo_e0N9rgNhRlrKhvT568pS7Ls,10112
|
|
32
|
+
fuzzybits_server-0.17.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
33
|
+
fuzzybits_server-0.17.0.dist-info/entry_points.txt,sha256=n-DgTezze2JBtJ2ABW-aGl05r2oCK2BGyRlD5HmbvkA,63
|
|
34
|
+
fuzzybits_server-0.17.0.dist-info/RECORD,,
|