Move to xautodl
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -4,3 +4,6 @@ | ||||
| [submodule ".latent-data/NATS-Bench"] | ||||
| 	path = .latent-data/NATS-Bench | ||||
| 	url = git@github.com:D-X-Y/NATS-Bench.git | ||||
| [submodule ".latent-data/NAS-Bench-201"] | ||||
| 	path = .latent-data/NAS-Bench-201 | ||||
| 	url = git@github.com:D-X-Y/NAS-Bench-201.git | ||||
|   | ||||
							
								
								
									
										1
									
								
								.latent-data/NAS-Bench-201
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								.latent-data/NAS-Bench-201
									
									
									
									
									
										Submodule
									
								
							 Submodule .latent-data/NAS-Bench-201 added at 8558547969
									
								
							| @@ -6,5 +6,6 @@ | ||||
| - [2019.01.31] [13e908f] GDAS codes were publicly released. | ||||
| - [2020.07.01] [a45808b] Upgrade NAS-API to the 2.0 version. | ||||
| - [2020.09.16] [7052265] Create NATS-BENCH. | ||||
| - [2020.10.15] [446262a] Update NATS-BENCH to version 1.0 | ||||
| - [2020.12.20] [dae387a] Update NATS-BENCH to version 1.1 | ||||
| - [2020.10.15] [446262a](https://github.com/D-X-Y/AutoDL-Projects/tree/446262a) Update NATS-BENCH to version 1.0 | ||||
| - [2020.12.20] [dae387a](https://github.com/D-X-Y/AutoDL-Projects/tree/dae387a) Update NATS-BENCH to version 1.1 | ||||
| - [2021.05.18] [98fadf8](https://github.com/D-X-Y/AutoDL-Projects/tree/98fadf8086727f6311d477d0e4f2d5bb7e41ca59) Before moving to `xautodl` | ||||
|   | ||||
| @@ -88,7 +88,7 @@ | ||||
|  | ||||
| ## 准备工作 | ||||
|  | ||||
| 请使用`3.6`以上的`Python`,更多的Python包参见[requirements.txt](docs/requirements.txt). | ||||
| 请使用`3.6`以上的`Python`,更多的Python包参见[requirements.txt](requirements.txt). | ||||
|  | ||||
| 请下载并且解压缩`CIFAR`和`ImageNet`到`$TORCH_HOME`. | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| nats_bench>=1.4 | ||||
| torchvision | ||||
| torch | ||||
| # Optional | ||||
| opencv | ||||
| torchvision | ||||
|  | ||||
| nats_bench>=1.4 | ||||
| nas_201_api | ||||
|   | ||||
| @@ -10,23 +10,25 @@ from tqdm import tqdm | ||||
| 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 procedures import prepare_seed, prepare_logger, save_checkpoint, copy_checkpoint | ||||
| from log_utils import time_string | ||||
| from log_utils import AverageMeter, convert_secs2time | ||||
| from xautodl.procedures import ( | ||||
|     prepare_seed, | ||||
|     prepare_logger, | ||||
|     save_checkpoint, | ||||
|     copy_checkpoint, | ||||
| ) | ||||
| from xautodl.log_utils import time_string | ||||
| from xautodl.log_utils import AverageMeter, convert_secs2time | ||||
|  | ||||
| from utils import split_str2indexes | ||||
| from xautodl.utils import split_str2indexes | ||||
|  | ||||
| from procedures.advanced_main import basic_train_fn, basic_eval_fn | ||||
| from procedures.metric_utils import SaveMetric, MSEMetric, ComposeMetric | ||||
| from datasets.synthetic_core import get_synthetic_env, EnvSampler | ||||
| from models.xcore import get_model | ||||
| from xlayers import super_core, trunc_normal_ | ||||
| from xautodl.procedures.advanced_main import basic_train_fn, basic_eval_fn | ||||
| from xautodl.procedures.metric_utils import SaveMetric, MSEMetric, ComposeMetric | ||||
| from xautodl.datasets.synthetic_core import get_synthetic_env, EnvSampler | ||||
| from xautodl.models.xcore import get_model | ||||
| from xautodl.xlayers import super_core, trunc_normal_ | ||||
|  | ||||
| from lfna_utils import lfna_setup, train_model, TimeData | ||||
| from lfna_meta_model import LFNA_Meta | ||||
| from xautodl.lfna_utils import lfna_setup, train_model, TimeData | ||||
| from xautodl.lfna_meta_model import LFNA_Meta | ||||
|  | ||||
|  | ||||
| def epoch_train(loader, meta_model, base_model, optimizer, criterion, device, logger): | ||||
|   | ||||
							
								
								
									
										59
									
								
								setup.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								setup.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| ##################################################### | ||||
| # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.05 # | ||||
| ##################################################### | ||||
| """The setup function for pypi.""" | ||||
| # The following is to make nats_bench avaliable on Python Package Index (PyPI) | ||||
| # | ||||
| # conda install -c conda-forge twine  # Use twine to upload nats_bench to pypi | ||||
| # | ||||
| # python setup.py sdist bdist_wheel | ||||
| # python setup.py --help-commands | ||||
| # twine check dist/* | ||||
| # | ||||
| # twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||||
| # twine upload dist/* | ||||
| # https://pypi.org/project/xautodl | ||||
| # | ||||
| # TODO(xuanyidong): upload it to conda | ||||
| # | ||||
| # [2021.05.18] v1.0 | ||||
| import os | ||||
| from setuptools import setup | ||||
|  | ||||
| NAME = "xautodl" | ||||
| REQUIRES_PYTHON = ">=3.6" | ||||
| DESCRIPTION = "Automated Deep Learning Package" | ||||
|  | ||||
| VERSION = "0.9.9" | ||||
|  | ||||
|  | ||||
| def read(fname="README.md"): | ||||
|     with open(os.path.join(os.path.dirname(__file__), fname), encoding="utf-8") as cfile: | ||||
|         return cfile.read() | ||||
|  | ||||
|  | ||||
| # What packages are required for this module to be executed? | ||||
| REQUIRED = ["numpy>=1.16.5,<=1.19.5"] | ||||
|  | ||||
| setup( | ||||
|     name=NAME, | ||||
|     version=VERSION, | ||||
|     author="Xuanyi Dong", | ||||
|     author_email="dongxuanyi888@gmail.com", | ||||
|     description=DESCRIPTION, | ||||
|     license="MIT Licence", | ||||
|     keywords="NAS Dataset API DeepLearning", | ||||
|     url="https://github.com/D-X-Y/AutoDL-Projects", | ||||
|     packages=["xautodl"], | ||||
|     install_requires=REQUIRED, | ||||
|     python_requires=REQUIRES_PYTHON, | ||||
|     long_description=read("README.md"), | ||||
|     long_description_content_type="text/markdown", | ||||
|     classifiers=[ | ||||
|         "Programming Language :: Python", | ||||
|         "Programming Language :: Python :: 3", | ||||
|         "Topic :: Database", | ||||
|         "Topic :: Scientific/Engineering :: Artificial Intelligence", | ||||
|         "License :: OSI Approved :: MIT License", | ||||
|     ], | ||||
| ) | ||||
							
								
								
									
										6
									
								
								xautodl/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								xautodl/__init__.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| ##################################################### | ||||
| # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.05 # | ||||
| ##################################################### | ||||
| # An Automated Deep Learning Package to support     # | ||||
| # research activities.                              # | ||||
| ##################################################### | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user