Refine lib -> xautodl

This commit is contained in:
D-X-Y 2021-05-19 14:10:01 +08:00
parent 596065c25d
commit 4000f882f7
5 changed files with 19 additions and 28 deletions

View File

@ -43,19 +43,16 @@ jobs:
run: | run: |
python setup.py install 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 - name: Test Search Space
run: | run: |
python -m pip install pytest numpy python -m pip install pytest numpy
python -m pip install torch torchvision
python -m pip install parameterized python -m pip install parameterized
echo $PWD echo $PWD
echo "Show what we have here:" echo "Show what we have here:"
ls ls
python --version python --version
python -m pytest ./tests/test_import.py -s
python -m pytest ./tests/test_basic_space.py -s python -m pytest ./tests/test_basic_space.py -s
shell: bash shell: bash

View File

@ -6,9 +6,9 @@ import torch
import torch.nn.functional as F import torch.nn.functional as F
from xlayers import super_core from xautodl.xlayers import super_core
from xlayers import trunc_normal_ from xautodl.xlayers import trunc_normal_
from models.xcore import get_model from xautodl.models.xcore import get_model
class LFNA_Meta(super_core.SuperModule): class LFNA_Meta(super_core.SuperModule):

View File

@ -21,15 +21,12 @@ ImageFile.LOAD_TRUNCATED_IMAGES = True
from copy import deepcopy from copy import deepcopy
from pathlib import Path from pathlib import Path
lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() from xautodl.config_utils import dict2config, load_config
if str(lib_dir) not in sys.path: from xautodl.procedures import bench_evaluate_for_seed
sys.path.insert(0, str(lib_dir)) from xautodl.procedures import get_machine_info
from config_utils import dict2config, load_config from xautodl.datasets import get_datasets
from procedures import bench_evaluate_for_seed from xautodl.log_utils import Logger, AverageMeter, time_string, convert_secs2time
from procedures import get_machine_info from xautodl.utils import split_str2indexes
from datasets import get_datasets
from log_utils import Logger, AverageMeter, time_string, convert_secs2time
from utils import split_str2indexes
def evaluate_all_datasets( def evaluate_all_datasets(

View File

@ -25,16 +25,13 @@ ImageFile.LOAD_TRUNCATED_IMAGES = True
from copy import deepcopy from copy import deepcopy
from pathlib import Path from pathlib import Path
lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() from xautodl.config_utils import dict2config, load_config
if str(lib_dir) not in sys.path: from xautodl.procedures import bench_evaluate_for_seed
sys.path.insert(0, str(lib_dir)) from xautodl.procedures import get_machine_info
from config_utils import dict2config, load_config from xautodl.datasets import get_datasets
from procedures import bench_evaluate_for_seed from xautodl.log_utils import Logger, AverageMeter, time_string, convert_secs2time
from procedures import get_machine_info from xautodl.models import CellStructure, CellArchitectures, get_search_spaces
from datasets import get_datasets from xautodl.utils import split_str2indexes
from log_utils import Logger, AverageMeter, time_string, convert_secs2time
from models import CellStructure, CellArchitectures, get_search_spaces
from utils import split_str2indexes
def evaluate_all_datasets( def evaluate_all_datasets(

View File

@ -6,7 +6,7 @@
# echo $scriptpath # echo $scriptpath
# delete Python cache files # 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 ./tests/
black ./xautodl/procedures black ./xautodl/procedures