Refine lib -> xautodl
This commit is contained in:
parent
95fb5a54b1
commit
596065c25d
7
.github/workflows/basic_test.yml
vendored
7
.github/workflows/basic_test.yml
vendored
@ -43,9 +43,13 @@ 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 parameterized
|
||||
echo $PWD
|
||||
@ -53,7 +57,6 @@ jobs:
|
||||
ls
|
||||
python --version
|
||||
python -m pytest ./tests/test_basic_space.py -s
|
||||
python -m pytest ./tests/test_import.py
|
||||
shell: bash
|
||||
|
||||
- name: Test Synthetic Data
|
||||
|
4
.github/workflows/super_model_test.yml
vendored
4
.github/workflows/super_model_test.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
||||
run: |
|
||||
python -m pip install pytest numpy
|
||||
python -m pip install parameterized
|
||||
python -m pip install torch torchvision torchaudio
|
||||
python -m pytest ./tests/test_super_*.py -s
|
||||
python -m pip install torch torchvision
|
||||
python -m pytest ./tests/test_super_*.py
|
||||
shell: bash
|
||||
|
@ -1,6 +1,13 @@
|
||||
#!/bin/bash
|
||||
# bash ./scripts/black.sh
|
||||
|
||||
# script=$(readlink -f "$0")
|
||||
# scriptpath=$(dirname "$script")
|
||||
# echo $scriptpath
|
||||
|
||||
# delete Python cache files
|
||||
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
||||
|
||||
black ./tests/
|
||||
black ./xautodl/procedures
|
||||
black ./xautodl/datasets
|
||||
|
@ -3,19 +3,11 @@
|
||||
#####################################################
|
||||
# pytest ./tests/test_super_model.py -s #
|
||||
#####################################################
|
||||
import sys, random
|
||||
import unittest
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
lib_dir = (Path(__file__).parent / ".." / "lib").resolve()
|
||||
print("library path: {:}".format(lib_dir))
|
||||
if str(lib_dir) not in sys.path:
|
||||
sys.path.insert(0, str(lib_dir))
|
||||
|
||||
import torch
|
||||
from xlayers.super_core import SuperRunMode
|
||||
from trade_models import get_transformer
|
||||
from xautodl.xlayers.super_core import SuperRunMode
|
||||
from xautodl.trade_models import get_transformer
|
||||
|
||||
|
||||
class TestSuperTransformer(unittest.TestCase):
|
||||
|
@ -3,18 +3,10 @@
|
||||
#####################################################
|
||||
# pytest tests/test_synthetic_env.py -s #
|
||||
#####################################################
|
||||
import sys, random
|
||||
import unittest
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
lib_dir = (Path(__file__).parent / ".." / "lib").resolve()
|
||||
print("library path: {:}".format(lib_dir))
|
||||
if str(lib_dir) not in sys.path:
|
||||
sys.path.insert(0, str(lib_dir))
|
||||
|
||||
from datasets.math_core import ConstantFunc, ComposedSinFunc
|
||||
from datasets.synthetic_core import SyntheticDEnv
|
||||
from xautodl.datasets.math_core import ConstantFunc, ComposedSinFunc
|
||||
from xautodl.datasets.synthetic_core import SyntheticDEnv
|
||||
|
||||
|
||||
class TestSynethicEnv(unittest.TestCase):
|
||||
|
@ -3,17 +3,9 @@
|
||||
#####################################################
|
||||
# pytest tests/test_synthetic_utils.py -s #
|
||||
#####################################################
|
||||
import sys, random
|
||||
import unittest
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
lib_dir = (Path(__file__).parent / ".." / "lib").resolve()
|
||||
print("library path: {:}".format(lib_dir))
|
||||
if str(lib_dir) not in sys.path:
|
||||
sys.path.insert(0, str(lib_dir))
|
||||
|
||||
from datasets.synthetic_core import TimeStamp
|
||||
from xautodl.datasets.synthetic_core import TimeStamp
|
||||
|
||||
|
||||
class TestTimeStamp(unittest.TestCase):
|
||||
|
@ -12,7 +12,7 @@ import torch
|
||||
import torch.nn as nn
|
||||
from enum import Enum
|
||||
|
||||
import xautodl.spaces
|
||||
from xautodl import spaces
|
||||
from .super_utils import IntSpaceType, BoolSpaceType
|
||||
from .super_utils import LayerOrder, SuperRunMode
|
||||
from .super_utils import TensorContainer
|
||||
|
Loading…
Reference in New Issue
Block a user