idslab 0.3.0__tar.gz → 0.3.2__tar.gz
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.
- {idslab-0.3.0 → idslab-0.3.2}/CHANGELOG.md +24 -2
- {idslab-0.3.0 → idslab-0.3.2}/CITATION.cff +1 -1
- idslab-0.3.2/CONTRIBUTING.md +66 -0
- {idslab-0.3.0 → idslab-0.3.2}/DESIGN.md +7 -4
- {idslab-0.3.0 → idslab-0.3.2}/INSTALL.md +95 -148
- idslab-0.3.2/PKG-INFO +142 -0
- idslab-0.3.2/README.md +88 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/compare-and-sweeps.md +1 -1
- {idslab-0.3.0 → idslab-0.3.2}/docs/dashboard.md +6 -4
- {idslab-0.3.0 → idslab-0.3.2}/docs/getting-started.md +1 -1
- idslab-0.3.2/docs/how-it-works.md +103 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/make_figures.py +4 -1
- {idslab-0.3.0 → idslab-0.3.2}/docs/outputs.md +5 -3
- {idslab-0.3.0 → idslab-0.3.2}/docs/protocol.md +8 -3
- {idslab-0.3.0 → idslab-0.3.2}/pyproject.toml +1 -1
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/__init__.py +1 -1
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/compare.py +4 -1
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/experiments.js +7 -6
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/library.js +2 -2
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/results.js +1 -1
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/workspace.py +25 -15
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/report.py +8 -5
- idslab-0.3.2/src/idslab/results_version.py +44 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/runner.py +9 -3
- idslab-0.3.2/src/idslab.egg-info/PKG-INFO +142 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab.egg-info/SOURCES.txt +4 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_dashboard.py +9 -5
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_examples.py +2 -2
- idslab-0.3.2/tests/test_release_script.py +105 -0
- idslab-0.3.2/tests/test_results_version.py +83 -0
- idslab-0.3.0/CONTRIBUTING.md +0 -37
- idslab-0.3.0/PKG-INFO +0 -254
- idslab-0.3.0/README.md +0 -200
- idslab-0.3.0/src/idslab.egg-info/PKG-INFO +0 -254
- {idslab-0.3.0 → idslab-0.3.2}/LICENSE +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/MANIFEST.in +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/architecture.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/cli.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/config-reference.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/dashboard-builder.png +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/dashboard-editor.png +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/dashboard-run.png +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/design-r1-four-layer.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/design-r1-router-gate.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/design-r2-anomaly-first.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/flow-map.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/frontier-gap.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/idslab-overview.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/report-page.png +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/selection.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/splits.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/img/stage-steps.svg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/limitations.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/docs/models.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/examples/README.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/examples/custom_adapter.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/examples/external_score_job.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/setup.cfg +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/adapters.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/cli.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/config.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/controls.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/README.md +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/__init__.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/catalog.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/jobs.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/server.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/app.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/builder.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/charts.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/compare.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/core.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/draft.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/index.html +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/jobs.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/setup.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/styles.css +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/dashboard/static/views.js +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/data.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/examples/__init__.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/examples/r1_four_layer.yaml +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/examples/r1_router_gate.yaml +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/examples/r2_anomaly_first.yaml +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/external.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/features.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/fitting.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/graph.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/html_report.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/metrics.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/plugins.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/prep.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/selection.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/sweep.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/synthetic.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab/torch_models.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab.egg-info/dependency_links.txt +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab.egg-info/entry_points.txt +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab.egg-info/requires.txt +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/src/idslab.egg-info/top_level.txt +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_adapters.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_cli.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_compare_sweep.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_config.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_controls.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_customization.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_dashboard_browser.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_data.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_external.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_fitting.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_graph.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_metrics.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_modes.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_prep.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_report.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_runner.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_selection.py +0 -0
- {idslab-0.3.0 → idslab-0.3.2}/tests/test_torch_models.py +0 -0
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
the
|
|
3
|
+
Finished run units are reused while their config, data and results version fingerprints match. A
|
|
4
|
+
release says when it raises the results version, which makes every experiment run once more; other
|
|
5
|
+
releases keep finished runs.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 0.3.2 (2026-10-17)
|
|
10
|
+
|
|
11
|
+
Documentation only; the code and the evaluation are unchanged, and finished runs are reused.
|
|
12
|
+
|
|
13
|
+
- A shorter README: overview, quickstart for every system, guides, versions and citation.
|
|
14
|
+
- `docs/how-it-works.md` explains a run with its figures: the design, the splits, the accuracy after
|
|
15
|
+
each stage, the frontier gap and the flow map.
|
|
16
|
+
- The project site describes the current builder, results page and fingerprints, and links the DOI.
|
|
17
|
+
|
|
18
|
+
## 0.3.1 (2026-10-17)
|
|
19
|
+
|
|
20
|
+
- Finished run units survive releases that do not change the evaluation. Fingerprints carry a results
|
|
21
|
+
version (`idslab.results_version.RESULTS_VERSION`, now 1) instead of the package version, and it
|
|
22
|
+
changes only with a release that changes what a run computes. Units from 0.2.0 and 0.3.0 count as
|
|
23
|
+
results version 1, so this release reuses them; `DONE` also records the release that wrote the unit.
|
|
24
|
+
- IDSLab is on PyPI: `pip install idslab`. The install guides for Windows, macOS and GNU/Linux use
|
|
25
|
+
it, so they no longer need the source code; installing from source is described separately for
|
|
26
|
+
changing IDSLab itself.
|
|
5
27
|
|
|
6
28
|
## 0.3.0 (2026-10-17)
|
|
7
29
|
|
|
@@ -8,7 +8,7 @@ authors:
|
|
|
8
8
|
alias: hashtagRR
|
|
9
9
|
orcid: "https://orcid.org/0009-0002-0385-3757"
|
|
10
10
|
doi: 10.5281/zenodo.23435536 # every version; Zenodo gives each release its own DOI as well
|
|
11
|
-
version: 0.3.
|
|
11
|
+
version: 0.3.2
|
|
12
12
|
date-released: "2026-10-17"
|
|
13
13
|
license: AGPL-3.0-or-later
|
|
14
14
|
repository-code: "https://github.com/hashtagRR/IDSLab"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Bug reports and pull requests are welcome at https://github.com/hashtagRR/IDSLab.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/hashtagRR/IDSLab
|
|
9
|
+
cd IDSLab
|
|
10
|
+
python -m venv .venv && . .venv/bin/activate
|
|
11
|
+
pip install -e ".[dev,xgboost,pyod,imbalance,torch]"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Checks
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pytest # the whole suite, a few minutes
|
|
18
|
+
ruff check src tests examples
|
|
19
|
+
ruff format --check src tests examples
|
|
20
|
+
pyright
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules for changes
|
|
24
|
+
|
|
25
|
+
- The protocol rules in [DESIGN.md](DESIGN.md) hold for every change: TEST labels never influence
|
|
26
|
+
fitting or selection, and the controls are always reported. The test suite includes a check that
|
|
27
|
+
shuffles TEST labels and requires the same frozen configuration; keep it passing.
|
|
28
|
+
- A change that can alter what a run computes raises `RESULTS_VERSION` in
|
|
29
|
+
`src/idslab/results_version.py`, so finished run units are not reused by mistake, and says so in
|
|
30
|
+
[CHANGELOG.md](CHANGELOG.md). Other changes leave it alone, so users keep their finished runs.
|
|
31
|
+
- Every change worth noting gets a line under "Unreleased" in the changelog; a release turns that
|
|
32
|
+
section into its notes (see [Releasing](#releasing)).
|
|
33
|
+
- New source and test files start with the license header:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
37
|
+
# Copyright (C) 2026 hashtagRR
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
By contributing you agree that your contribution is licensed under the AGPL-3.0-or-later.
|
|
41
|
+
|
|
42
|
+
## Releasing
|
|
43
|
+
|
|
44
|
+
Releases run from GitHub Actions; nothing is uploaded from a personal machine.
|
|
45
|
+
|
|
46
|
+
1. Make sure the changelog's **Unreleased** section describes the release, and that it says so when
|
|
47
|
+
`RESULTS_VERSION` was raised (users' experiments then run once more).
|
|
48
|
+
2. On GitHub, open **Actions**, choose **release**, press **Run workflow** on `main`, and give the
|
|
49
|
+
version (for example `0.3.1`) and, optionally, words for the title.
|
|
50
|
+
3. The workflow tests `main`, sets the version in `pyproject.toml`, `src/idslab/__init__.py` and
|
|
51
|
+
`CITATION.cff`, dates the changelog section (leaving an empty **Unreleased** heading for the next
|
|
52
|
+
changes), builds and checks the packages, and prepares the commit "Release X.Y.Z" and the tag
|
|
53
|
+
`vX.Y.Z` without pushing them.
|
|
54
|
+
4. The PyPI upload waits for approval in the `pypi` environment. Approving it publishes to PyPI with
|
|
55
|
+
Trusted Publishing (no token); only then are the commit and tag pushed and the GitHub release
|
|
56
|
+
created, with the changelog section as its notes. Zenodo archives that release and gives it a DOI.
|
|
57
|
+
|
|
58
|
+
`python scripts/release.py X.Y.Z --notes notes.md` shows locally what step 3 changes (`git diff`; undo
|
|
59
|
+
with `git checkout .`). Declining the approval, or a failed upload, leaves `main` and the tags
|
|
60
|
+
untouched, so the same version can simply be run again. If `main` moved while the release waited for approval, the
|
|
61
|
+
workflow merges the release commit into it; when the two changed the same lines it asks, in the run's
|
|
62
|
+
warnings, for the tag to be merged by hand.
|
|
63
|
+
|
|
64
|
+
One-time setup: on PyPI, project `idslab`, **Publishing**, add a GitHub publisher for owner
|
|
65
|
+
`hashtagRR`, repository `IDSLab`, workflow `release.yml`, environment `pypi`. On GitHub, **Settings**,
|
|
66
|
+
**Environments**, create `pypi` and add yourself as a required reviewer.
|
|
@@ -302,7 +302,7 @@ All controls use the same fitted first-stage model as the cascade.
|
|
|
302
302
|
fallbacks, metrics, controls), `split_ids.parquet` (row ids per split), `per_flow.parquet` (TEST:
|
|
303
303
|
scores, stage path, verdict, type, control predictions), `val_flow.parquet`, `DONE`.
|
|
304
304
|
`DONE` holds fingerprints of the config, the data files, every imported external score file and its
|
|
305
|
-
JSON sidecar, the split, and the
|
|
305
|
+
JSON sidecar, the split, and the results version; any mismatch reruns the unit, and a report leaves the
|
|
306
306
|
unit out until it is rerun. `runs/<name>/report.md` aggregates over seeds.
|
|
307
307
|
|
|
308
308
|
## 9. Example config
|
|
@@ -417,7 +417,7 @@ classifier that can clear its alarms). `idslab example` writes both with a synth
|
|
|
417
417
|
|
|
418
418
|
**Reports and resume**
|
|
419
419
|
|
|
420
|
-
- A seed enters the report only if its DONE file carries this config's, data's and
|
|
420
|
+
- A seed enters the report only if its DONE file carries this config's, data's and results version's
|
|
421
421
|
fingerprints; the report covers `protocol.seeds` plus any seeds named with `--seeds`.
|
|
422
422
|
- Every report writes `report.md`, `report.json` and `report.html`, all from one aggregate. The HTML
|
|
423
423
|
page is self-contained (inline CSS and SVG, no scripts, no network). Its cascade map ends each route
|
|
@@ -426,8 +426,11 @@ classifier that can clear its alarms). `idslab example` writes both with a synth
|
|
|
426
426
|
when a pool detector is active.
|
|
427
427
|
- `idslab run` and `export-splits` log progress to stderr (unit started, each stage fitted, the
|
|
428
428
|
configuration frozen on VAL, TEST evaluation). With `--jobs` above 1 the worker processes do not log.
|
|
429
|
-
- The
|
|
430
|
-
while the config, data and version fingerprints
|
|
429
|
+
- The results version (`idslab/results_version.py`) changes whenever a change can alter what a run
|
|
430
|
+
computes, because finished seeds are reused while the config, data and results version fingerprints
|
|
431
|
+
match. The package version is not in the fingerprints, so a release that changes only the dashboard
|
|
432
|
+
or the docs keeps every finished unit. Units written before results versions existed (0.2.0, 0.3.0)
|
|
433
|
+
count as results version 1. `DONE` also records the IDSLab release that wrote the unit, for people.
|
|
431
434
|
|
|
432
435
|
**Tests**
|
|
433
436
|
|
|
@@ -6,7 +6,7 @@ most of it spent downloading libraries (a few hundred MB).
|
|
|
6
6
|
- [Windows](#windows)
|
|
7
7
|
- [macOS](#macos)
|
|
8
8
|
- [GNU/Linux](#gnulinux)
|
|
9
|
-
- [
|
|
9
|
+
- [From the source code](#from-the-source-code)
|
|
10
10
|
- [Optional extras](#optional-extras)
|
|
11
11
|
- [Tests and checks](#tests-and-checks)
|
|
12
12
|
- [Troubleshooting on every system](#troubleshooting-on-every-system)
|
|
@@ -15,7 +15,8 @@ What you need: Python 3.10 or newer (3.12 is the safest choice: every optional l
|
|
|
15
15
|
packages for it), about 1 GB of free disk space, and an internet connection for the install. No
|
|
16
16
|
compiler, no administrator rights after Python is installed.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The guides install IDSLab from [PyPI](https://pypi.org/project/idslab/) into a folder of its own;
|
|
19
|
+
the source code is only needed to change IDSLab itself ([from the source code](#from-the-source-code)).
|
|
19
20
|
|
|
20
21
|
---
|
|
21
22
|
|
|
@@ -40,60 +41,38 @@ so every command starts with `.\.venv\Scripts\`.
|
|
|
40
41
|
You should see a line with `3.12`. If PowerShell says `py` is not recognized, run the installer
|
|
41
42
|
again, choose **Modify**, and tick **py launcher**.
|
|
42
43
|
|
|
43
|
-
### 2.
|
|
44
|
+
### 2. Make a folder for IDSLab
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
1. Open [github.com/hashtagRR/IDSLab](https://github.com/hashtagRR/IDSLab), click the green **Code**
|
|
48
|
-
button, then **Download ZIP**.
|
|
49
|
-
2. In File Explorer, right-click `IDSLab-main.zip` in Downloads, choose **Extract All...**, then
|
|
50
|
-
**Extract**.
|
|
51
|
-
3. Windows puts the files in a folder inside a folder of the same name:
|
|
52
|
-
`Downloads\IDSLab-main\IDSLab-main`. The inner one is the project folder: it contains
|
|
53
|
-
`pyproject.toml`, `README.md` and the `src` folder. Use that one below.
|
|
54
|
-
|
|
55
|
-
**Option B, Git** (if [Git for Windows](https://git-scm.com/download/win) is installed):
|
|
56
|
-
|
|
57
|
-
```powershell
|
|
58
|
-
cd $HOME
|
|
59
|
-
git clone https://github.com/hashtagRR/IDSLab.git
|
|
60
|
-
cd IDSLab
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### 3. Open PowerShell in the project folder
|
|
64
|
-
|
|
65
|
-
In File Explorer, open the project folder (the one with `pyproject.toml`), click the address bar,
|
|
66
|
-
type `powershell` and press Enter. A PowerShell window opens in that folder. (On Windows 11 you can
|
|
67
|
-
also right-click inside the folder and choose **Open in Terminal**.)
|
|
68
|
-
|
|
69
|
-
Check you are in the right place:
|
|
46
|
+
In the same PowerShell window:
|
|
70
47
|
|
|
71
48
|
```powershell
|
|
72
|
-
|
|
49
|
+
mkdir $HOME\idslab
|
|
50
|
+
cd $HOME\idslab
|
|
73
51
|
```
|
|
74
52
|
|
|
75
|
-
This
|
|
53
|
+
This is the **IDSLab folder**: the program, the example and your results live here. Every command
|
|
54
|
+
below runs in it. (Any other plain local folder works too; avoid OneDrive and network folders.)
|
|
76
55
|
|
|
77
|
-
###
|
|
56
|
+
### 3. Create the virtual environment
|
|
78
57
|
|
|
79
58
|
```powershell
|
|
80
59
|
py -3.12 -m venv .venv
|
|
81
60
|
dir .venv\Scripts\python.exe
|
|
82
61
|
```
|
|
83
62
|
|
|
84
|
-
The second command must list `python.exe`. If
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
The second command must list `python.exe`. If `.venv` was created but has a `bin` folder instead of
|
|
64
|
+
`Scripts`, a non-Windows Python (MSYS2, Git Bash, Cygwin) made it: delete the `.venv` folder and run
|
|
65
|
+
the `py -3.12` line again.
|
|
87
66
|
|
|
88
|
-
###
|
|
67
|
+
### 4. Install IDSLab
|
|
89
68
|
|
|
90
69
|
```powershell
|
|
91
70
|
.\.venv\Scripts\python -m pip install --upgrade pip
|
|
92
|
-
.\.venv\Scripts\pip install
|
|
71
|
+
.\.venv\Scripts\pip install idslab
|
|
93
72
|
```
|
|
94
73
|
|
|
95
|
-
The second line downloads scikit-learn, pandas and the other libraries; it takes a few
|
|
96
|
-
check:
|
|
74
|
+
The second line downloads IDSLab with scikit-learn, pandas and the other libraries; it takes a few
|
|
75
|
+
minutes. Then check:
|
|
97
76
|
|
|
98
77
|
```powershell
|
|
99
78
|
.\.venv\Scripts\idslab --version
|
|
@@ -101,7 +80,7 @@ check:
|
|
|
101
80
|
|
|
102
81
|
It prints `idslab 0.3.0` (or a newer number).
|
|
103
82
|
|
|
104
|
-
###
|
|
83
|
+
### 5. Create the demo folder (do not skip)
|
|
105
84
|
|
|
106
85
|
The dashboard always works inside one folder, its **workspace**: it lists the configs, data and
|
|
107
86
|
results found there and saves new files there. That folder must exist before the dashboard starts.
|
|
@@ -112,7 +91,7 @@ For a first try, let IDSLab create one called `demo`, with example data and thre
|
|
|
112
91
|
```
|
|
113
92
|
|
|
114
93
|
It prints `wrote demo\data\train.parquet, demo\data\test.parquet and r1_router_gate.yaml, ...` and
|
|
115
|
-
creates this inside the
|
|
94
|
+
creates this inside the IDSLab folder:
|
|
116
95
|
|
|
117
96
|
```text
|
|
118
97
|
demo\
|
|
@@ -125,9 +104,9 @@ demo\
|
|
|
125
104
|
You only do this once. If you skip it, the next step stops with
|
|
126
105
|
`workspace folder demo does not exist`.
|
|
127
106
|
|
|
128
|
-
###
|
|
107
|
+
### 6. Open the dashboard
|
|
129
108
|
|
|
130
|
-
Still in the
|
|
109
|
+
Still in the IDSLab folder (the one that now contains `demo`):
|
|
131
110
|
|
|
132
111
|
```powershell
|
|
133
112
|
.\.venv\Scripts\idslab dashboard --workspace demo --open
|
|
@@ -146,7 +125,7 @@ Still in the project folder (the one that now contains `demo`):
|
|
|
146
125
|
explains the rest.
|
|
147
126
|
- It only listens on this computer, so Windows does not ask for firewall access.
|
|
148
127
|
|
|
149
|
-
###
|
|
128
|
+
### 7. A run from the command line (optional)
|
|
150
129
|
|
|
151
130
|
The same run without the dashboard, as it would go in a script:
|
|
152
131
|
|
|
@@ -158,11 +137,12 @@ Progress lines show what it is doing. When it finishes, open `demo\runs\r1-route
|
|
|
158
137
|
(double-click it in File Explorer). The dashboard shows runs from the command line too, and the two
|
|
159
138
|
reuse each other's finished seeds.
|
|
160
139
|
|
|
161
|
-
###
|
|
140
|
+
### 8. Next time
|
|
162
141
|
|
|
163
|
-
Open PowerShell
|
|
142
|
+
Open PowerShell and go to the IDSLab folder; `demo` from step 5 is still there:
|
|
164
143
|
|
|
165
144
|
```powershell
|
|
145
|
+
cd $HOME\idslab
|
|
166
146
|
.\.venv\Scripts\idslab dashboard --workspace demo --open
|
|
167
147
|
```
|
|
168
148
|
|
|
@@ -172,32 +152,32 @@ system", allow local scripts for your user once with
|
|
|
172
152
|
`Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`, then activate again. In Command Prompt
|
|
173
153
|
(`cmd.exe`) use `.venv\Scripts\activate.bat` instead.
|
|
174
154
|
|
|
175
|
-
###
|
|
155
|
+
### 9. Update or remove
|
|
176
156
|
|
|
177
|
-
- **Update
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
- **Remove:** delete the
|
|
157
|
+
- **Update:** `.\.venv\Scripts\pip install --upgrade idslab` in the IDSLab folder. Your configs,
|
|
158
|
+
data and results stay where they are. A new version runs finished experiments once more before
|
|
159
|
+
their reports can be rebuilt (the [changelog](CHANGELOG.md) says when).
|
|
160
|
+
- **Remove:** delete the IDSLab folder. Nothing was installed anywhere else (Python itself stays;
|
|
181
161
|
remove it in Settings, Apps if you want).
|
|
182
162
|
|
|
183
163
|
### Windows troubleshooting
|
|
184
164
|
|
|
185
165
|
| What you see | Cause and fix |
|
|
186
166
|
|---|---|
|
|
187
|
-
| `workspace folder demo does not exist` (older versions: `workspace demo is not a folder`) | Step
|
|
167
|
+
| `workspace folder demo does not exist` (older versions: `workspace demo is not a folder`) | Step 5 has not run in this folder, or PowerShell is in another folder. Go to the IDSLab folder (`cd $HOME\idslab`), run `.\.venv\Scripts\idslab example demo`, then start the dashboard again. |
|
|
188
168
|
| `The module '.venv' could not be loaded` | The command is missing the leading `.\`, or uses `bin` instead of `Scripts`: type `.\.venv\Scripts\idslab ...` |
|
|
189
169
|
| `py : The term 'py' is not recognized` | The py launcher is missing: rerun the python.org installer, **Modify**, tick **py launcher**. |
|
|
190
170
|
| `python` opens the Microsoft Store | Windows' store placeholder; use `py -3.12`, or turn the placeholder off in Settings, Apps, Advanced app settings, App execution aliases. |
|
|
191
|
-
| `.venv\Scripts` does not exist | Step
|
|
192
|
-
| `
|
|
193
|
-
| `running scripts is disabled on this system` | Only `Activate.ps1` needs scripts; use the full `.\.venv\Scripts\...` commands, or see step
|
|
171
|
+
| `.venv\Scripts` does not exist | Step 3 has not run in this folder, or a non-Windows Python made a `.venv\bin`: delete `.venv` and run `py -3.12 -m venv .venv`. |
|
|
172
|
+
| `No matching distribution found for idslab` | The environment's Python is older than 3.10: delete `.venv` and create it again with `py -3.12`. |
|
|
173
|
+
| `running scripts is disabled on this system` | Only `Activate.ps1` needs scripts; use the full `.\.venv\Scripts\...` commands, or see step 8. |
|
|
194
174
|
| The browser does not open | Go to http://127.0.0.1:8765/ yourself while the PowerShell window still runs the dashboard. |
|
|
195
175
|
| The page cannot be reached | The dashboard is not running (window closed or Ctrl+C), or it uses another port: read the address it printed. |
|
|
196
176
|
| `[WinError 10048] Only one usage of each socket address` | Port 8765 is taken, often by a dashboard in another window. Close it, or start with `--port 8766` (or `--port 0` for any free port). |
|
|
197
177
|
| Windows asks for firewall access | The dashboard was started with `--host 0.0.0.0` or another address. With the default 127.0.0.1 no prompt appears. |
|
|
198
|
-
| Everything is slow | Antivirus scanning, or the
|
|
178
|
+
| Everything is slow | Antivirus scanning, or the IDSLab folder inside OneDrive or a network folder. Use a plain local folder such as `C:\idslab`. |
|
|
199
179
|
| `pip` tries to build a package from source and fails | Your Python is newer than that library's packages; use Python 3.12. |
|
|
200
|
-
| Errors about paths longer than 260 characters |
|
|
180
|
+
| Errors about paths longer than 260 characters | Use a shorter IDSLab folder such as `C:\idslab`, or enable long paths in Windows. |
|
|
201
181
|
|
|
202
182
|
---
|
|
203
183
|
|
|
@@ -228,34 +208,17 @@ Check again; the python.org and Homebrew installs both provide `python3.12`:
|
|
|
228
208
|
python3.12 --version
|
|
229
209
|
```
|
|
230
210
|
|
|
231
|
-
### 2.
|
|
232
|
-
|
|
233
|
-
**Option A, ZIP file:**
|
|
234
|
-
|
|
235
|
-
1. Open [github.com/hashtagRR/IDSLab](https://github.com/hashtagRR/IDSLab), click the green **Code**
|
|
236
|
-
button, then **Download ZIP**.
|
|
237
|
-
2. Safari extracts it automatically into `Downloads/IDSLab-main`; with another browser, double-click
|
|
238
|
-
`IDSLab-main.zip` in Downloads. The `IDSLab-main` folder is the project folder: it contains
|
|
239
|
-
`pyproject.toml`.
|
|
240
|
-
|
|
241
|
-
**Option B, Git** (installed with the command line developer tools, `xcode-select --install`):
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
cd ~
|
|
245
|
-
git clone https://github.com/hashtagRR/IDSLab.git
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### 3. Open Terminal in the project folder
|
|
211
|
+
### 2. Make a folder for IDSLab
|
|
249
212
|
|
|
250
213
|
```bash
|
|
251
|
-
|
|
252
|
-
|
|
214
|
+
mkdir ~/idslab
|
|
215
|
+
cd ~/idslab
|
|
253
216
|
```
|
|
254
217
|
|
|
255
|
-
|
|
256
|
-
|
|
218
|
+
This is the **IDSLab folder**: the program, the example and your results live here, and every command
|
|
219
|
+
below runs in it.
|
|
257
220
|
|
|
258
|
-
###
|
|
221
|
+
### 3. Create the virtual environment
|
|
259
222
|
|
|
260
223
|
```bash
|
|
261
224
|
python3.12 -m venv .venv
|
|
@@ -263,17 +226,17 @@ python3.12 -m venv .venv
|
|
|
263
226
|
|
|
264
227
|
(Use `python3` instead of `python3.12` if your system Python is already 3.10 or newer.)
|
|
265
228
|
|
|
266
|
-
###
|
|
229
|
+
### 4. Install IDSLab
|
|
267
230
|
|
|
268
231
|
```bash
|
|
269
232
|
.venv/bin/python -m pip install --upgrade pip
|
|
270
|
-
.venv/bin/pip install
|
|
233
|
+
.venv/bin/pip install idslab
|
|
271
234
|
.venv/bin/idslab --version
|
|
272
235
|
```
|
|
273
236
|
|
|
274
237
|
The last line prints `idslab 0.3.0` (or a newer number).
|
|
275
238
|
|
|
276
|
-
###
|
|
239
|
+
### 5. Create the demo folder (do not skip)
|
|
277
240
|
|
|
278
241
|
The dashboard always works inside one folder, its **workspace**, which must exist before it starts.
|
|
279
242
|
For a first try, let IDSLab create `demo` with example data and three ready designs:
|
|
@@ -283,10 +246,10 @@ For a first try, let IDSLab create `demo` with example data and three ready desi
|
|
|
283
246
|
```
|
|
284
247
|
|
|
285
248
|
It writes `demo/data/train.parquet`, `demo/data/test.parquet` and three designs
|
|
286
|
-
(`r1_router_gate.yaml`, `r1_four_layer.yaml`, `r2_anomaly_first.yaml`) inside the
|
|
249
|
+
(`r1_router_gate.yaml`, `r1_four_layer.yaml`, `r2_anomaly_first.yaml`) inside the IDSLab folder. You
|
|
287
250
|
only do this once; without it the next step stops with `workspace folder demo does not exist`.
|
|
288
251
|
|
|
289
|
-
###
|
|
252
|
+
### 6. Open the dashboard
|
|
290
253
|
|
|
291
254
|
```bash
|
|
292
255
|
.venv/bin/idslab dashboard --workspace demo --open
|
|
@@ -297,7 +260,7 @@ use it; **Ctrl+C** in Terminal stops it. For a first run, click **Continue setup
|
|
|
297
260
|
`r1-router-gate`, then **Run** on the Review & run step (about a minute per seed). For your own data,
|
|
298
261
|
make a folder with your Parquet or CSV files and pass it as `--workspace`.
|
|
299
262
|
|
|
300
|
-
###
|
|
263
|
+
### 7. A run from the command line (optional)
|
|
301
264
|
|
|
302
265
|
```bash
|
|
303
266
|
.venv/bin/idslab run demo/r1_router_gate.yaml --out demo/runs
|
|
@@ -306,22 +269,20 @@ open demo/runs/r1-router-gate/report.html
|
|
|
306
269
|
|
|
307
270
|
The same run without the dashboard; `open` shows the report in your browser.
|
|
308
271
|
|
|
309
|
-
###
|
|
272
|
+
### 8. Next time
|
|
310
273
|
|
|
311
274
|
```bash
|
|
312
|
-
cd ~/
|
|
275
|
+
cd ~/idslab
|
|
313
276
|
.venv/bin/idslab dashboard --workspace demo --open
|
|
314
277
|
```
|
|
315
278
|
|
|
316
279
|
Or activate the environment once per Terminal window with `source .venv/bin/activate` and type plain
|
|
317
280
|
`idslab`.
|
|
318
281
|
|
|
319
|
-
###
|
|
282
|
+
### 9. Update or remove
|
|
320
283
|
|
|
321
|
-
- **Update
|
|
322
|
-
|
|
323
|
-
- **Update, Git install:** `git pull && .venv/bin/pip install -e .`
|
|
324
|
-
- **Remove:** delete the project folder.
|
|
284
|
+
- **Update:** `.venv/bin/pip install --upgrade idslab` in the IDSLab folder; your files stay.
|
|
285
|
+
- **Remove:** delete the IDSLab folder.
|
|
325
286
|
|
|
326
287
|
### macOS troubleshooting
|
|
327
288
|
|
|
@@ -332,7 +293,7 @@ Or activate the environment once per Terminal window with `source .venv/bin/acti
|
|
|
332
293
|
| `SSL: CERTIFICATE_VERIFY_FAILED` during the install | Run **Install Certificates.command** in Applications, Python 3.12. |
|
|
333
294
|
| `Library not loaded: @rpath/libomp.dylib` with XGBoost or LightGBM | They need OpenMP: `brew install libomp`. |
|
|
334
295
|
| `Address already in use` for the dashboard | Another program uses port 8765: start with `--port 0` and open the address it prints. |
|
|
335
|
-
| `zsh: no matches found:
|
|
296
|
+
| `zsh: no matches found: idslab[xgboost]` | Quote extras in zsh: `pip install "idslab[xgboost]"`. |
|
|
336
297
|
|
|
337
298
|
---
|
|
338
299
|
|
|
@@ -348,61 +309,44 @@ Check the Python version:
|
|
|
348
309
|
python3 --version
|
|
349
310
|
```
|
|
350
311
|
|
|
351
|
-
It must be 3.10 or newer. Install Python's virtual environment support
|
|
352
|
-
|
|
312
|
+
It must be 3.10 or newer. Install Python's virtual environment support with your distribution's
|
|
313
|
+
package manager:
|
|
353
314
|
|
|
354
315
|
| Distribution | Command |
|
|
355
316
|
|---|---|
|
|
356
|
-
| Debian, Ubuntu, Linux Mint | `sudo apt update && sudo apt install python3 python3-venv python3-pip
|
|
357
|
-
| Fedora | `sudo dnf install python3 python3-pip
|
|
358
|
-
| Arch, Manjaro | `sudo pacman -S python python-pip
|
|
359
|
-
| openSUSE | `sudo zypper install python3 python3-pip
|
|
317
|
+
| Debian, Ubuntu, Linux Mint | `sudo apt update && sudo apt install python3 python3-venv python3-pip` |
|
|
318
|
+
| Fedora | `sudo dnf install python3 python3-pip` |
|
|
319
|
+
| Arch, Manjaro | `sudo pacman -S python python-pip` |
|
|
320
|
+
| openSUSE | `sudo zypper install python3 python3-pip` |
|
|
360
321
|
|
|
361
322
|
If your distribution's Python is older than 3.10 (for example Ubuntu 20.04), install a newer one with
|
|
362
323
|
[pyenv](https://github.com/pyenv/pyenv) or, on Ubuntu, the `deadsnakes` archive, and use that
|
|
363
|
-
`python3.12` in step
|
|
364
|
-
|
|
365
|
-
### 2. Download IDSLab
|
|
366
|
-
|
|
367
|
-
**Option A, ZIP file:**
|
|
368
|
-
|
|
369
|
-
```bash
|
|
370
|
-
cd ~
|
|
371
|
-
wget https://github.com/hashtagRR/IDSLab/archive/refs/heads/main.zip -O IDSLab-main.zip
|
|
372
|
-
unzip IDSLab-main.zip # without unzip: python3 -m zipfile -e IDSLab-main.zip .
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
(Or download it from the green **Code** button on GitHub and extract it with your file manager.)
|
|
324
|
+
`python3.12` in step 3.
|
|
376
325
|
|
|
377
|
-
|
|
326
|
+
### 2. Make a folder for IDSLab
|
|
378
327
|
|
|
379
328
|
```bash
|
|
380
|
-
|
|
381
|
-
|
|
329
|
+
mkdir ~/idslab
|
|
330
|
+
cd ~/idslab
|
|
382
331
|
```
|
|
383
332
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
cd ~/IDSLab-main # or: cd ~/IDSLab for a Git install
|
|
388
|
-
ls pyproject.toml
|
|
389
|
-
```
|
|
333
|
+
This is the **IDSLab folder**; every command below runs in it.
|
|
390
334
|
|
|
391
|
-
###
|
|
335
|
+
### 3. Create the virtual environment
|
|
392
336
|
|
|
393
337
|
```bash
|
|
394
338
|
python3 -m venv .venv
|
|
395
339
|
```
|
|
396
340
|
|
|
397
|
-
###
|
|
341
|
+
### 4. Install IDSLab
|
|
398
342
|
|
|
399
343
|
```bash
|
|
400
344
|
.venv/bin/python -m pip install --upgrade pip
|
|
401
|
-
.venv/bin/pip install
|
|
345
|
+
.venv/bin/pip install idslab
|
|
402
346
|
.venv/bin/idslab --version
|
|
403
347
|
```
|
|
404
348
|
|
|
405
|
-
###
|
|
349
|
+
### 5. Create the demo folder (do not skip)
|
|
406
350
|
|
|
407
351
|
The dashboard always works inside one folder, its **workspace**, which must exist before it starts.
|
|
408
352
|
For a first try, let IDSLab create `demo` with example data and three ready designs:
|
|
@@ -412,10 +356,10 @@ For a first try, let IDSLab create `demo` with example data and three ready desi
|
|
|
412
356
|
```
|
|
413
357
|
|
|
414
358
|
It writes `demo/data/train.parquet`, `demo/data/test.parquet` and three designs
|
|
415
|
-
(`r1_router_gate.yaml`, `r1_four_layer.yaml`, `r2_anomaly_first.yaml`) inside the
|
|
359
|
+
(`r1_router_gate.yaml`, `r1_four_layer.yaml`, `r2_anomaly_first.yaml`) inside the IDSLab folder. You
|
|
416
360
|
only do this once; without it the next step stops with `workspace folder demo does not exist`.
|
|
417
361
|
|
|
418
|
-
###
|
|
362
|
+
### 6. Open the dashboard
|
|
419
363
|
|
|
420
364
|
```bash
|
|
421
365
|
.venv/bin/idslab dashboard --workspace demo --open
|
|
@@ -436,7 +380,7 @@ ssh -L 8765:127.0.0.1:8765 you@server
|
|
|
436
380
|
Do not start the dashboard with `--host 0.0.0.0` on a shared network: it runs commands and has no
|
|
437
381
|
login.
|
|
438
382
|
|
|
439
|
-
###
|
|
383
|
+
### 7. A run from the command line (optional)
|
|
440
384
|
|
|
441
385
|
```bash
|
|
442
386
|
.venv/bin/idslab run demo/r1_router_gate.yaml --out demo/runs
|
|
@@ -445,29 +389,25 @@ xdg-open demo/runs/r1-router-gate/report.html
|
|
|
445
389
|
|
|
446
390
|
The same run without the dashboard; `xdg-open` shows the report in your browser.
|
|
447
391
|
|
|
448
|
-
###
|
|
392
|
+
### 8. Next time
|
|
449
393
|
|
|
450
394
|
```bash
|
|
451
|
-
cd ~/
|
|
395
|
+
cd ~/idslab
|
|
452
396
|
.venv/bin/idslab dashboard --workspace demo --open
|
|
453
397
|
```
|
|
454
398
|
|
|
455
399
|
Or `source .venv/bin/activate` once per terminal and type plain `idslab`.
|
|
456
400
|
|
|
457
|
-
###
|
|
401
|
+
### 9. Update or remove
|
|
458
402
|
|
|
459
|
-
- **Update
|
|
460
|
-
|
|
461
|
-
- **Update, Git install:** `git pull && .venv/bin/pip install -e .`
|
|
462
|
-
- **Remove:** delete the project folder.
|
|
403
|
+
- **Update:** `.venv/bin/pip install --upgrade idslab` in the IDSLab folder; your files stay.
|
|
404
|
+
- **Remove:** delete the IDSLab folder.
|
|
463
405
|
|
|
464
406
|
### GNU/Linux troubleshooting
|
|
465
407
|
|
|
466
408
|
| What you see | Cause and fix |
|
|
467
409
|
|---|---|
|
|
468
410
|
| `The virtual environment was not created successfully because ensurepip is not available` | Install the venv package: `sudo apt install python3-venv` (or `python3.12-venv`). |
|
|
469
|
-
| `unzip: command not found` | Install it (step 1), or extract with Python: `python3 -m zipfile -e IDSLab-main.zip .` |
|
|
470
|
-
| `wget: command not found` | Use `curl -L -o IDSLab-main.zip https://github.com/hashtagRR/IDSLab/archive/refs/heads/main.zip` |
|
|
471
411
|
| `error: externally-managed-environment` | `pip` was run outside the virtual environment; use `.venv/bin/pip`. |
|
|
472
412
|
| `xdg-open: not found` or no browser opens | Open the file or http://127.0.0.1:8765/ in a browser yourself. |
|
|
473
413
|
| `Address already in use` | Another program uses port 8765: start with `--port 0` and use the address it prints. |
|
|
@@ -475,17 +415,22 @@ Or `source .venv/bin/activate` once per terminal and type plain `idslab`.
|
|
|
475
415
|
|
|
476
416
|
---
|
|
477
417
|
|
|
478
|
-
##
|
|
418
|
+
## From the source code
|
|
479
419
|
|
|
480
|
-
|
|
481
|
-
|
|
420
|
+
Only needed to change IDSLab itself or to run its tests. Clone the repository (or download the ZIP
|
|
421
|
+
from the green **Code** button on GitHub and extract it), then install it in place, with the
|
|
422
|
+
development tools, inside the project folder (the one with `pyproject.toml`):
|
|
482
423
|
|
|
483
424
|
```bash
|
|
484
|
-
|
|
425
|
+
git clone https://github.com/hashtagRR/IDSLab.git
|
|
426
|
+
cd IDSLab
|
|
427
|
+
python3 -m venv .venv
|
|
428
|
+
.venv/bin/pip install -e ".[dev]"
|
|
485
429
|
```
|
|
486
430
|
|
|
487
|
-
|
|
488
|
-
|
|
431
|
+
On Windows, use `py -3.12 -m venv .venv` and `.\.venv\Scripts\pip`. Changes to the source then take
|
|
432
|
+
effect without reinstalling. To try the newest unreleased code without a clone,
|
|
433
|
+
`pip install "git+https://github.com/hashtagRR/IDSLab.git"` works in any virtual environment.
|
|
489
434
|
|
|
490
435
|
## Optional extras
|
|
491
436
|
|
|
@@ -498,12 +443,14 @@ IDSLab is on PyPI, `pip install idslab` does the same.
|
|
|
498
443
|
| `torch` | torch | `idslab.torch_models.TorchMLPClassifier`, `TorchAutoencoder` |
|
|
499
444
|
| `dev` | pytest, ruff, pyright, build, twine | tests and checks |
|
|
500
445
|
|
|
501
|
-
Install them in the
|
|
446
|
+
Install them in the IDSLab folder, with the quotes:
|
|
502
447
|
|
|
503
448
|
| System | Command |
|
|
504
449
|
|---|---|
|
|
505
|
-
| Windows | `.\.venv\Scripts\pip install
|
|
506
|
-
| macOS, GNU/Linux | `.venv/bin/pip install
|
|
450
|
+
| Windows | `.\.venv\Scripts\pip install "idslab[xgboost,pyod]"` |
|
|
451
|
+
| macOS, GNU/Linux | `.venv/bin/pip install "idslab[xgboost,pyod]"` |
|
|
452
|
+
|
|
453
|
+
(From the source code, use `pip install -e ".[xgboost,pyod]"` in the project folder instead.)
|
|
507
454
|
|
|
508
455
|
A config that names a class from a missing extra fails when it is loaded, before any data is read,
|
|
509
456
|
with the install command in the message; the dashboard's builder lists such models as "needs an
|
|
@@ -520,7 +467,7 @@ pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
|
520
467
|
|
|
521
468
|
## Tests and checks
|
|
522
469
|
|
|
523
|
-
For changes to IDSLab itself:
|
|
470
|
+
For changes to IDSLab itself, in a copy of the source code ([from the source code](#from-the-source-code)):
|
|
524
471
|
|
|
525
472
|
```bash
|
|
526
473
|
.venv/bin/pip install -e ".[dev,xgboost,pyod,imbalance,torch]"
|
|
@@ -536,7 +483,7 @@ On Windows replace `.venv/bin/` with `.\.venv\Scripts\`.
|
|
|
536
483
|
|
|
537
484
|
| Message | Fix |
|
|
538
485
|
|---|---|
|
|
539
|
-
| `workspace folder demo does not exist` | the dashboard's `--workspace` folder must exist: run `idslab example demo` first (step
|
|
486
|
+
| `workspace folder demo does not exist` | the dashboard's `--workspace` folder must exist: run `idslab example demo` first (step 5), or name a folder that holds your data; the path is relative to the folder the terminal is in |
|
|
540
487
|
| `cannot import module 'xgboost' (install it with: pip install idslab[xgboost])` | install the named extra |
|
|
541
488
|
| `Encode: non-numeric columns not listed in 'categorical'` | add the text columns to the `categorical` list of `idslab.prep.Encode` in that stage's pipeline (the dashboard's Data step does this from your data) |
|
|
542
489
|
| `train and test columns differ` | the two files need the same columns; drop extras with `dataset.drop` |
|