diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e97e1f4..1df98c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,21 +2,56 @@ name: CI on: push: - branches: [ "main" ] + branches: ["main"] pull_request: jobs: - build: + test: runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.11" - - name: Install + python-version: ${{ matrix.python-version }} + + - name: Install package run: | python -m pip install --upgrade pip python -m pip install -e . + - name: Import check run: | - python -c "import multiverse; from multiverse.datasets import list_datasets; print(list_datasets())" + python -c "import multiverse; print(multiverse.__file__)" + + - name: Basic package check + run: | + python -c "import importlib.metadata as md; print(md.version('aeon-multiverse'))" + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build tools + run: | + python -m pip install --upgrade pip build twine + + - name: Build package + run: | + python -m build + + - name: Check built distributions + run: | + twine check dist/* \ No newline at end of file diff --git a/experiments/run_benchmark.py b/experiments/run_benchmark.py index 0047940..a89fbba 100644 --- a/experiments/run_benchmark.py +++ b/experiments/run_benchmark.py @@ -6,28 +6,20 @@ import time import pandas as pd -from aeon.classification.interval_based import TimeSeriesForestClassifier +from aeon.classification.convolution_based import RocketClassifier -from multiverse.datasets import list_datasets, load_dataset - - -def main(): - ap = argparse.ArgumentParser() - ap.add_argument("--datasets", default="all", help="Comma-separated list, or 'all'") - ap.add_argument("--out", default="benchmark_results.csv") - args = ap.parse_args() - - if args.datasets.strip().lower() == "all": - datasets = list_datasets() - else: - datasets = [d.strip() for d in args.datasets.split(",") if d.strip()] +from aeon.datasets import load_classification +from aeon.datasets.tsc_datasets import multivariate_equal_length +def experiment_example(): + datasets = ["BasicMotions"] rows = [] for name in datasets: - X_train, y_train = load_dataset(name, "train") - X_test, y_test = load_dataset(name, "test") + X_train, y_train = load_classification(name, "train") + X_test, y_test = load_classification(name, "test") + + clf = RocketClassifier(n_kernels=500, random_state=0) - clf = TimeSeriesForestClassifier(n_estimators=200, random_state=0) t0 = time.time() clf.fit(X_train, y_train) @@ -52,4 +44,4 @@ def main(): if __name__ == "__main__": - main() + experiment_example()