Repository navigation
v0.2.2 (2026-12-01)
Bug Fixes
- Import plotly lazily so the CLI runs without the visualize extra (
fcf1686)
delphi/main.py imports delphi.log.result_analysis unconditionally, and that module imported plotly at the top level. plotly is only in the optional [visualize] extra, so python -m delphi --help (and any run) failed with ModuleNotFoundError on a plain install. #97 had made plotly optional through import_plotly(); the top-level imports came back later.
Import plotly inside the three plotting functions via import_plotly() and add a regression test that imports the module with plotly unavailable.
Submitted by Phuderoso, with help from AI agents. Reproduced and tested locally before submission.
- Keep n_train examples when train_type is mix (
1635d9c)
The mix sampler took int(n_train * (1 - ratio_top)) examples from the quantiles, which floors float error: 10 * (1 - 0.8) is 1.9999999999999996, so n_train=10 with ratio_top=0.8 returned 9 examples, and n_train=5 returned 4. Take the remainder after the top examples instead, so the total is n_train.
Detailed Changes: v0.2.1...v0.2.2