diff --git a/.github/workflows/basic_test.yml b/.github/workflows/basic_test.yml index 6866af0..d6b5a4c 100644 --- a/.github/workflows/basic_test.yml +++ b/.github/workflows/basic_test.yml @@ -43,19 +43,16 @@ jobs: run: | python setup.py install - - name: Test Import - run: | - python -m pip install torch torchvision - python -m pytest ./tests/test_import.py - - name: Test Search Space run: | python -m pip install pytest numpy + python -m pip install torch torchvision python -m pip install parameterized echo $PWD echo "Show what we have here:" ls python --version + python -m pytest ./tests/test_import.py -s python -m pytest ./tests/test_basic_space.py -s shell: bash diff --git a/exps/LFNA/lfna_meta_model.py b/exps/LFNA/lfna_meta_model.py index a3871f1..e80a75a 100644 --- a/exps/LFNA/lfna_meta_model.py +++ b/exps/LFNA/lfna_meta_model.py @@ -6,9 +6,9 @@ import torch import torch.nn.functional as F -from xlayers import super_core -from xlayers import trunc_normal_ -from models.xcore import get_model +from xautodl.xlayers import super_core +from xautodl.xlayers import trunc_normal_ +from xautodl.models.xcore import get_model class LFNA_Meta(super_core.SuperModule): diff --git a/exps/NATS-Bench/main-sss.py b/exps/NATS-Bench/main-sss.py index e63c076..66a693d 100644 --- a/exps/NATS-Bench/main-sss.py +++ b/exps/NATS-Bench/main-sss.py @@ -21,15 +21,12 @@ ImageFile.LOAD_TRUNCATED_IMAGES = True from copy import deepcopy from pathlib import Path -lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() -if str(lib_dir) not in sys.path: - sys.path.insert(0, str(lib_dir)) -from config_utils import dict2config, load_config -from procedures import bench_evaluate_for_seed -from procedures import get_machine_info -from datasets import get_datasets -from log_utils import Logger, AverageMeter, time_string, convert_secs2time -from utils import split_str2indexes +from xautodl.config_utils import dict2config, load_config +from xautodl.procedures import bench_evaluate_for_seed +from xautodl.procedures import get_machine_info +from xautodl.datasets import get_datasets +from xautodl.log_utils import Logger, AverageMeter, time_string, convert_secs2time +from xautodl.utils import split_str2indexes def evaluate_all_datasets( diff --git a/exps/NATS-Bench/main-tss.py b/exps/NATS-Bench/main-tss.py index b5ca5fb..e3e1016 100644 --- a/exps/NATS-Bench/main-tss.py +++ b/exps/NATS-Bench/main-tss.py @@ -25,16 +25,13 @@ ImageFile.LOAD_TRUNCATED_IMAGES = True from copy import deepcopy from pathlib import Path -lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() -if str(lib_dir) not in sys.path: - sys.path.insert(0, str(lib_dir)) -from config_utils import dict2config, load_config -from procedures import bench_evaluate_for_seed -from procedures import get_machine_info -from datasets import get_datasets -from log_utils import Logger, AverageMeter, time_string, convert_secs2time -from models import CellStructure, CellArchitectures, get_search_spaces -from utils import split_str2indexes +from xautodl.config_utils import dict2config, load_config +from xautodl.procedures import bench_evaluate_for_seed +from xautodl.procedures import get_machine_info +from xautodl.datasets import get_datasets +from xautodl.log_utils import Logger, AverageMeter, time_string, convert_secs2time +from xautodl.models import CellStructure, CellArchitectures, get_search_spaces +from xautodl.utils import split_str2indexes def evaluate_all_datasets( diff --git a/scripts/black.sh b/scripts/black.sh index 2d3ac9c..5574512 100644 --- a/scripts/black.sh +++ b/scripts/black.sh @@ -6,7 +6,7 @@ # echo $scriptpath # delete Python cache files -find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf +find . | grep -E "(__pycache__|\.pyc|\.DS_Store|\.pyo$)" | xargs rm -rf black ./tests/ black ./xautodl/procedures