From 3d6f1b27bf853b530f7d1e0609ff5b0b19bf8374 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Sun, 27 Oct 2024 20:57:44 +0100 Subject: [PATCH 01/15] packaging1 --- AROS/main.py => main.py | 10 +++--- pyproject.toml | 3 ++ requirements.txt | 9 +++-- setup.cfg | 22 ++----------- tests/test_dataloaders.py | 69 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 27 deletions(-) rename AROS/main.py => main.py (97%) create mode 100644 pyproject.toml create mode 100644 tests/test_dataloaders.py diff --git a/AROS/main.py b/main.py similarity index 97% rename from AROS/main.py rename to main.py index 6845400..f28fa85 100644 --- a/AROS/main.py +++ b/main.py @@ -1,13 +1,13 @@ -!pip install -r requirements.txt +import aros import argparse import torch import torch.nn as nn -from evaluate import * -from utils import * +from aros.evaluate import * +from aros.utils import * from tqdm.notebook import tqdm -from data_loader import * -from stability_loss_function import * +from aros.data_loader import * +from aros.stability_loss_function import * def main(): parser = argparse.ArgumentParser(description="Hyperparameters for the script") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8fe2f47 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index c5b0a81..2cb89b0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,9 @@ geotorch +torch torchdiffeq -git+https://github.com/RobustBench/robustbench.git -timm==1.0.9 \ No newline at end of file +timm==1.0.9 +robustbench +numpy +scikit-learn +scipy +tqdm \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 64cb16f..c328d2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,28 +6,13 @@ author_email = mackenzie@post.harvard.edu description = AROS: Adversarially Robust Out-of-Distribution Detection through Stability long_description = file: README.md long_description_content_type = text/markdown -license_files = LICENSE.md -license_file_type = text/markdown url = https://github.com/AdaptiveMotorControlLab/AROS -project_urls = - Bug Tracker = https://github.com/AdaptiveMotorControlLab/AROS/issues -classifiers = - Development Status :: 4 - Beta - Environment :: GPU :: NVIDIA CUDA - Intended Audience :: Science/Research - Operating System :: OS Independent - Programming Language :: Python :: 3 - Topic :: Scientific/Engineering :: Artificial Intelligence - License :: OSI Approved :: Apache Software License [options] packages = find: include_package_data = True python_requires = >=3.10 -install_requires = - geotorch - torchdiffeq - git+https://github.com/RobustBench/robustbench.git +install_requires = file: requirements.txt [options.extras_require] dev = @@ -35,7 +20,4 @@ dev = toml yapf black - pytest - -[bdist_wheel] -universal=0 \ No newline at end of file + pytest \ No newline at end of file diff --git a/tests/test_dataloaders.py b/tests/test_dataloaders.py new file mode 100644 index 0000000..79e38bc --- /dev/null +++ b/tests/test_dataloaders.py @@ -0,0 +1,69 @@ +import pytest +import torch +from torch.utils.data import DataLoader, Subset +from torchvision.datasets import CIFAR10, CIFAR100 +from torchvision.transforms import ToTensor +from aros import ( + LabelChangedDataset, + get_subsampled_subset, + get_loaders, +) + +# Set up transformations and datasets for tests +transform_tensor = ToTensor() + +@pytest.fixture +def cifar10_datasets(): + trainset = CIFAR10(root='./data', train=True, download=True, transform=transform_tensor) + testset = CIFAR10(root='./data', train=False, download=True, transform=transform_tensor) + return trainset, testset + +@pytest.fixture +def cifar100_datasets(): + trainset = CIFAR100(root='./data', train=True, download=True, transform=transform_tensor) + testset = CIFAR100(root='./data', train=False, download=True, transform=transform_tensor) + return trainset, testset + +def test_label_changed_dataset(cifar10_datasets): + _, testset = cifar10_datasets + new_label = 99 + relabeled_dataset = LabelChangedDataset(testset, new_label) + + assert len(relabeled_dataset) == len(testset), "Relabeled dataset should match the original dataset length" + + for img, label in relabeled_dataset: + assert label == new_label, "All labels should be changed to the new label" + +def test_get_subsampled_subset(cifar10_datasets): + trainset, _ = cifar10_datasets + subset_ratio = 0.1 + subset = get_subsampled_subset(trainset, subset_ratio=subset_ratio) + + expected_size = int(len(trainset) * subset_ratio) + assert len(subset) == expected_size, f"Subset size should be {expected_size}" + +def test_get_loaders_cifar10(cifar10_datasets): + train_loader, test_loader, test_set, test_loader_vs_other = get_loaders('cifar10') + + assert isinstance(train_loader, DataLoader) + assert isinstance(test_loader, DataLoader) + assert isinstance(test_loader_vs_other, DataLoader) + + for images, labels in test_loader: + assert images.shape[0] == 16, "Test loader batch size should be 16" + break + +def test_get_loaders_cifar100(cifar100_datasets): + train_loader, test_loader, test_set, test_loader_vs_other = get_loaders('cifar100') + + assert isinstance(train_loader, DataLoader) + assert isinstance(test_loader, DataLoader) + assert isinstance(test_loader_vs_other, DataLoader) + + for images, labels in test_loader: + assert images.shape[0] == 16, "Test loader batch size should be 16" + break + +def test_get_loaders_invalid_dataset(): + with pytest.raises(ValueError, match="Dataset 'invalid_dataset' is not supported."): + get_loaders('invalid_dataset') From fb55ee45022cf6a1a03360943eb4d5e168f34b69 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Sun, 27 Oct 2024 23:15:15 +0100 Subject: [PATCH 02/15] rename for pypi --- {AROS => aros_node}/__init__.py | 0 {AROS => aros_node}/data_loader.py | 0 {AROS => aros_node}/evaluate.py | 0 {AROS => aros_node}/stability_loss_function.py | 0 {AROS => aros_node}/utils.py | 0 main.py | 10 +++++----- tests/test_dataloaders.py | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename {AROS => aros_node}/__init__.py (100%) rename {AROS => aros_node}/data_loader.py (100%) rename {AROS => aros_node}/evaluate.py (100%) rename {AROS => aros_node}/stability_loss_function.py (100%) rename {AROS => aros_node}/utils.py (100%) diff --git a/AROS/__init__.py b/aros_node/__init__.py similarity index 100% rename from AROS/__init__.py rename to aros_node/__init__.py diff --git a/AROS/data_loader.py b/aros_node/data_loader.py similarity index 100% rename from AROS/data_loader.py rename to aros_node/data_loader.py diff --git a/AROS/evaluate.py b/aros_node/evaluate.py similarity index 100% rename from AROS/evaluate.py rename to aros_node/evaluate.py diff --git a/AROS/stability_loss_function.py b/aros_node/stability_loss_function.py similarity index 100% rename from AROS/stability_loss_function.py rename to aros_node/stability_loss_function.py diff --git a/AROS/utils.py b/aros_node/utils.py similarity index 100% rename from AROS/utils.py rename to aros_node/utils.py diff --git a/main.py b/main.py index f28fa85..4fa7a17 100644 --- a/main.py +++ b/main.py @@ -1,13 +1,13 @@ -import aros +import aros_node import argparse import torch import torch.nn as nn -from aros.evaluate import * -from aros.utils import * +from aros_node.evaluate import * +from aros_node.utils import * from tqdm.notebook import tqdm -from aros.data_loader import * -from aros.stability_loss_function import * +from aros_node.data_loader import * +from aros_node.stability_loss_function import * def main(): parser = argparse.ArgumentParser(description="Hyperparameters for the script") diff --git a/tests/test_dataloaders.py b/tests/test_dataloaders.py index 79e38bc..058fd90 100644 --- a/tests/test_dataloaders.py +++ b/tests/test_dataloaders.py @@ -3,7 +3,7 @@ from torch.utils.data import DataLoader, Subset from torchvision.datasets import CIFAR10, CIFAR100 from torchvision.transforms import ToTensor -from aros import ( +from aros_node import ( LabelChangedDataset, get_subsampled_subset, get_loaders, From 07bdb10e3feb135089dee79c8c8edea965244ed3 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Sun, 27 Oct 2024 23:51:50 +0100 Subject: [PATCH 03/15] fix imports --- aros_node/evaluate.py | 2 +- aros_node/stability_loss_function.py | 4 ++-- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aros_node/evaluate.py b/aros_node/evaluate.py index c6a2919..1732550 100644 --- a/aros_node/evaluate.py +++ b/aros_node/evaluate.py @@ -1,7 +1,7 @@ import numpy as np from tqdm.notebook import tqdm from sklearn.metrics import roc_curve, roc_auc_score, precision_recall_curve, auc -from utils import * +from aros_node.utils import * import argparse import torch import torch.nn as nn diff --git a/aros_node/stability_loss_function.py b/aros_node/stability_loss_function.py index 75dddb4..413c6f3 100644 --- a/aros_node/stability_loss_function.py +++ b/aros_node/stability_loss_function.py @@ -2,8 +2,8 @@ from robustbench.utils import load_model import torch.nn as nn from torch.nn.parameter import Parameter -import utils -from utils import * +import aros_node.utils +from aros_node.utils import * from torch.utils.data import DataLoader, Dataset, TensorDataset, Subset, SubsetRandomSampler, ConcatDataset import numpy as np from tqdm.notebook import tqdm diff --git a/setup.cfg b/setup.cfg index c328d2d..955ebb3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = aros +name = aros-node version = 0.0.1 author = Hossein Mirzaei, Mackenzie Mathis author_email = mackenzie@post.harvard.edu From a2a966bcf112867582190e806d934e7da8fce147 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:03:47 +0100 Subject: [PATCH 04/15] versioning --- .gitignore | 1 + aros_node/__init__.py | 8 +++++--- aros_node/version.py | 1 + setup.cfg | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 aros_node/version.py diff --git a/.gitignore b/.gitignore index f27f895..bcb9b59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.tar.gz # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/aros_node/__init__.py b/aros_node/__init__.py index fc97800..340c0f0 100644 --- a/aros_node/__init__.py +++ b/aros_node/__init__.py @@ -1,3 +1,5 @@ -#© M.W. Mathis Lab | Hossein Mirzaei & M.W. Mathis -# https://github.com/https://github.com/AdaptiveMotorControlLab/AROS -# Licensed under Apache 2.0 \ No newline at end of file +# © M.W. Mathis Lab | Hossein Mirzaei & M.W. Mathis +# https://github.com/AdaptiveMotorControlLab/AROS +# Licensed under Apache 2.0 + +from aros_node.version import __version__ diff --git a/aros_node/version.py b/aros_node/version.py new file mode 100644 index 0000000..f102a9c --- /dev/null +++ b/aros_node/version.py @@ -0,0 +1 @@ +__version__ = "0.0.1" diff --git a/setup.cfg b/setup.cfg index 955ebb3..231ab7b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = aros-node -version = 0.0.1 +version = attr: aros_node.version.__version__ author = Hossein Mirzaei, Mackenzie Mathis author_email = mackenzie@post.harvard.edu description = AROS: Adversarially Robust Out-of-Distribution Detection through Stability From 9e6456aaf59aabec2c1b8163feafd6a4f3764db2 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:10:05 +0100 Subject: [PATCH 05/15] workflows --- .github/workflows/release-pypi.yml | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release-pypi.yml diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml new file mode 100644 index 0000000..8ffd37a --- /dev/null +++ b/.github/workflows/release-pypi.yml @@ -0,0 +1,52 @@ +name: Update internal release + +on: + push: + tags: + - 'v*.*.*' + pull_request: + branches: + - main + types: + - labeled + - opened + - edited + - synchronize + - reopened + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Cache dependencies + id: pip-cache + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build and publish to Test PyPI + if: ${{ (github.ref != 'refs/heads/main') && (github.event.label.name == 'release') }} + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} + run: | + make dist + ls dist/ + tar tvf dist/aros-node-*.tar.gz + python3 -m twine upload --repository testpypi dist/* + + - name: Build and publish to PyPI + if: ${{ github.event_name == 'push' }} + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + make dist + ls dist/ + tar tvf dist/aros-node-*.tar.gz + python3 -m twine upload dist/* \ No newline at end of file From 241d422a8645403e77bae4b152d1f329624d3266 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:21:30 +0100 Subject: [PATCH 06/15] tests and reinstall script --- .github/workflows/build.yaml | 80 ++++++++++++++++++++++++++++++ .github/workflows/release-pypi.yml | 2 +- reinstall.sh | 27 ++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yaml create mode 100755 reinstall.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..672b90e --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,80 @@ +name: Python package + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + python-version: ["3.10", "3.12"] + # We aim to support the versions on pytorch.org + # as well as selected previous versions on + # https://pytorch.org/get-started/previous-versions/ + torch-version: ["2.4.0"] + include: + - os: windows-latest + torch-version: 2.4.0 + python-version: "3.12" + + runs-on: ${{ matrix.os }} + + steps: + - name: Cache dependencies + id: pip-cache + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: pip-os_${{ runner.os }}-python_${{ matrix.python-version }}-torch_${{ matrix.torch-version }} + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install package + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu + pip install '.[dev]' + + - name: Run the formatter + run: | + make format + + - name: Run the spelling detector + run: | + make codespell + + - name: Check CITATION.cff validity + run: | + cffconvert --validate + + - name: Check that no binary files have been added to repo + if: matrix.os == 'ubuntu-latest' + run: | + make check_for_binary + + - name: Run pytest tests + timeout-minutes: 10 + run: | + make test + + - name: Build package + run: | + make build + + - name: Check reinstall script + timeout-minutes: 10 + run: | + ./reinstall.sh \ No newline at end of file diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 8ffd37a..4378652 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -1,4 +1,4 @@ -name: Update internal release +name: release on: push: diff --git a/reinstall.sh b/reinstall.sh new file mode 100755 index 0000000..1392f76 --- /dev/null +++ b/reinstall.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Re-install the package. By running './reinstall.sh' +# +# Note that AROS uses the build +# system specified in +# PEP517 https://peps.python.org/pep-0517/ and +# PEP518 https://peps.python.org/pep-0518/ +# and hence there is no setup.py file. + +set -e # abort on error + +pip uninstall -y aros-node + +# Get version info after uninstalling --- this will automatically get the +# most recent version based on the source code in the current directory. +# $(tools/get_cebra_version.sh) +VERSION=0.0.1 +echo "Upgrading to AROS v${VERSION}" + +# Upgrade the build system (PEP517/518 compatible) +python3 -m pip install virtualenv +python3 -m pip install --upgrade build +python3 -m build --sdist --wheel . + +# Reinstall the package with most recent version +pip install --upgrade --no-cache-dir "dist/aros_node-${VERSION}-py3-none-any.whl" \ No newline at end of file From 71b74e64ffe9b195925131e5e2effba8b8b1c179 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:23:21 +0100 Subject: [PATCH 07/15] codespell --- .github/workflows/codespell.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..7a8ed40 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,21 @@ +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v1 + with: + ignore_words_list: aros \ No newline at end of file From 8329e63d63d9081a96c983092044d590f136d85e Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:24:31 +0100 Subject: [PATCH 08/15] remove 3.10 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 672b90e..9696a71 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - python-version: ["3.10", "3.12"] + python-version: ["3.12"] # We aim to support the versions on pytorch.org # as well as selected previous versions on # https://pytorch.org/get-started/previous-versions/ From d785343a31366684057ebc3fef97f79f73fc2e11 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:26:02 +0100 Subject: [PATCH 09/15] words --- .github/workflows/codespell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 7a8ed40..a480cff 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -18,4 +18,4 @@ jobs: - name: Codespell uses: codespell-project/actions-codespell@v1 with: - ignore_words_list: aros \ No newline at end of file + ignore_words_list: aros, fpr, tpr, idx, fpr95 \ No newline at end of file From 065f6649c92b80e51d93ff45aec646746ba4fcaf Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:29:03 +0100 Subject: [PATCH 10/15] build --- .github/workflows/build.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9696a71..229af2d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,22 +44,15 @@ jobs: - name: Install package run: | + python -m pip install git+https://github.com/RobustBench/robustbench.git python -m pip install --upgrade pip setuptools wheel python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu pip install '.[dev]' - - name: Run the formatter - run: | - make format - - name: Run the spelling detector run: | make codespell - - name: Check CITATION.cff validity - run: | - cffconvert --validate - - name: Check that no binary files have been added to repo if: matrix.os == 'ubuntu-latest' run: | @@ -75,6 +68,6 @@ jobs: make build - name: Check reinstall script - timeout-minutes: 10 + timeout-minutes: 3 run: | ./reinstall.sh \ No newline at end of file From 786ec838b16808518a30823f4c3da4e795ae00f1 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:33:37 +0100 Subject: [PATCH 11/15] fix build script --- .github/workflows/build.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 229af2d..45cd6b7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,10 +49,6 @@ jobs: python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu pip install '.[dev]' - - name: Run the spelling detector - run: | - make codespell - - name: Check that no binary files have been added to repo if: matrix.os == 'ubuntu-latest' run: | From f783569cf13b308d57b4ee348198d4e2a7f51df3 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:37:34 +0100 Subject: [PATCH 12/15] fix build script --- .github/workflows/build.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 45cd6b7..0da97fe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,11 +49,6 @@ jobs: python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu pip install '.[dev]' - - name: Check that no binary files have been added to repo - if: matrix.os == 'ubuntu-latest' - run: | - make check_for_binary - - name: Run pytest tests timeout-minutes: 10 run: | From 315e57d7a27fdcdc43782faf91698ad1ad59f622 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:44:52 +0100 Subject: [PATCH 13/15] fix build script --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0da97fe..59e9bb9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -48,11 +48,12 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu pip install '.[dev]' - + - name: Run pytest tests timeout-minutes: 10 run: | - make test + pip install pytest + python -m pytest - name: Build package run: | From 9d4438fd989f53407572af8fb07093d18a3c1973 Mon Sep 17 00:00:00 2001 From: MMathisLab Date: Mon, 28 Oct 2024 00:53:12 +0100 Subject: [PATCH 14/15] fix imports --- aros_node/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aros_node/__init__.py b/aros_node/__init__.py index 340c0f0..f0a11bb 100644 --- a/aros_node/__init__.py +++ b/aros_node/__init__.py @@ -3,3 +3,7 @@ # Licensed under Apache 2.0 from aros_node.version import __version__ +from aros_node.data_loader import LabelChangedDataset, get_subsampled_subset, get_loaders +from aros_node.evaluate import compute_fpr95, compute_auroc, compute_aupr, get_clean_AUC, wrapper_method +from aros_node.stability_loss_function import * +from aros_node.utils import * \ No newline at end of file From f360df6936ea66a5ab53f2a95e6c7648ac8a0c9c Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Mon, 28 Oct 2024 09:23:01 +0100 Subject: [PATCH 15/15] Update reinstall.sh --- reinstall.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 1392f76..082d492 100755 --- a/reinstall.sh +++ b/reinstall.sh @@ -12,9 +12,7 @@ set -e # abort on error pip uninstall -y aros-node -# Get version info after uninstalling --- this will automatically get the -# most recent version based on the source code in the current directory. -# $(tools/get_cebra_version.sh) +# Get version VERSION=0.0.1 echo "Upgrading to AROS v${VERSION}"