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: |
|
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 parameterized
|
python -m pip install parameterized
|
||||||
echo $PWD
|
echo $PWD
|
||||||
@ -53,7 +57,6 @@ jobs:
|
|||||||
ls
|
ls
|
||||||
python --version
|
python --version
|
||||||
python -m pytest ./tests/test_basic_space.py -s
|
python -m pytest ./tests/test_basic_space.py -s
|
||||||
python -m pytest ./tests/test_import.py
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Test Synthetic Data
|
- 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: |
|
run: |
|
||||||
python -m pip install pytest numpy
|
python -m pip install pytest numpy
|
||||||
python -m pip install parameterized
|
python -m pip install parameterized
|
||||||
python -m pip install torch torchvision torchaudio
|
python -m pip install torch torchvision
|
||||||
python -m pytest ./tests/test_super_*.py -s
|
python -m pytest ./tests/test_super_*.py
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# bash ./scripts/black.sh
|
# 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 ./tests/
|
||||||
black ./xautodl/procedures
|
black ./xautodl/procedures
|
||||||
black ./xautodl/datasets
|
black ./xautodl/datasets
|
||||||
|
@ -3,19 +3,11 @@
|
|||||||
#####################################################
|
#####################################################
|
||||||
# pytest ./tests/test_super_model.py -s #
|
# pytest ./tests/test_super_model.py -s #
|
||||||
#####################################################
|
#####################################################
|
||||||
import sys, random
|
|
||||||
import unittest
|
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
|
import torch
|
||||||
from xlayers.super_core import SuperRunMode
|
from xautodl.xlayers.super_core import SuperRunMode
|
||||||
from trade_models import get_transformer
|
from xautodl.trade_models import get_transformer
|
||||||
|
|
||||||
|
|
||||||
class TestSuperTransformer(unittest.TestCase):
|
class TestSuperTransformer(unittest.TestCase):
|
||||||
|
@ -3,18 +3,10 @@
|
|||||||
#####################################################
|
#####################################################
|
||||||
# pytest tests/test_synthetic_env.py -s #
|
# pytest tests/test_synthetic_env.py -s #
|
||||||
#####################################################
|
#####################################################
|
||||||
import sys, random
|
|
||||||
import unittest
|
import unittest
|
||||||
import pytest
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
lib_dir = (Path(__file__).parent / ".." / "lib").resolve()
|
from xautodl.datasets.math_core import ConstantFunc, ComposedSinFunc
|
||||||
print("library path: {:}".format(lib_dir))
|
from xautodl.datasets.synthetic_core import SyntheticDEnv
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
class TestSynethicEnv(unittest.TestCase):
|
class TestSynethicEnv(unittest.TestCase):
|
||||||
|
@ -3,17 +3,9 @@
|
|||||||
#####################################################
|
#####################################################
|
||||||
# pytest tests/test_synthetic_utils.py -s #
|
# pytest tests/test_synthetic_utils.py -s #
|
||||||
#####################################################
|
#####################################################
|
||||||
import sys, random
|
|
||||||
import unittest
|
import unittest
|
||||||
import pytest
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
lib_dir = (Path(__file__).parent / ".." / "lib").resolve()
|
from xautodl.datasets.synthetic_core import TimeStamp
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
class TestTimeStamp(unittest.TestCase):
|
class TestTimeStamp(unittest.TestCase):
|
||||||
|
@ -12,7 +12,7 @@ import torch
|
|||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
import xautodl.spaces
|
from xautodl import spaces
|
||||||
from .super_utils import IntSpaceType, BoolSpaceType
|
from .super_utils import IntSpaceType, BoolSpaceType
|
||||||
from .super_utils import LayerOrder, SuperRunMode
|
from .super_utils import LayerOrder, SuperRunMode
|
||||||
from .super_utils import TensorContainer
|
from .super_utils import TensorContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user