Python 3.12 support#9
Open
marcpinet wants to merge 11 commits into
Open
Conversation
…egacy AutoEncoder param names
marcpinet
marked this pull request as draft
July 21, 2026 16:19
marcpinet
marked this pull request as ready for review
July 21, 2026 17:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Python 3.8 reached end of life in October 2024, but the project cannot run on anything newer because the TODS baselines depend on the abandoned d3m ecosystem. This PR makes the benchmark run on Python 3.12 in a plain venv, with all baseline families working.
Changes
Dependencies
transformers<4.50: the LLM baselines copy GPT-2 code that uses APIs removed in transformers 5.requirements-optional.txt(Python 3.8 only, for reproducing old results).TODS: d3m replaced with pyod
The benchmarked TODS models were thin wrappers around pyod. They now call pyod directly:
tol, COFn_neighbors, windowed PCAwhiten/n_components);epochs,hidden_neurons, ...) are mapped to the new pyod API instead of raisingTypeError;tods/pyod_core/with small numpy/sklearn fixes;tods/third_party/;tods.lstmodetectorskiis not available (TensorFlow code internal to TODS, unused by the scripts); it raises a clear error.Other fixes
merlion.RandomCutForestcould not start its JVM on Java 8 (--add-opensis Java 9+); it now retries without these options.torch.loadcalls for the Timer, UniTS and CALF checkpoints now passweights_only=False, required since PyTorch 2.6.np.complexreplaced withnp.complex128in TFAD..gitignore: venvs,__pycache__, checkpoint folders.Tests
Python 3.12.11, Linux (WSL2), Java 8, RTX 4070 SUPER.
Comparison with published results
AUC-ROC on CalIt2 and Genesis with the repository default configurations, against the values published in the TeamWork paper:
merlion.AutoEncodermerlion.IsolationForesttods.ocsvmskitods.pcaodetectorskitods.hbosskiNine values out of ten are within 0.001-0.012 of the published number. The last one (
tods.hbosskion Genesis) gives the same 0.1238 with pyod 0.8.9 (the d3m-era version), 1.1.3 and 3.6.2, so the difference does not come from this PR; the published value must have been obtained with tuned hyperparameters rather than the repository defaults.Known issues (pre-existing, out of scope)
n_components=Noneon near-constant channels. The historical defaultn_components=1avoids it.max_forecast_steps.self_impl.VAR_modelonly has the forecasting interface and cannot run under the detection strategies.Breaking changes
tods.lstmodetectorskiis unavailable.transformersis capped below 5.0.