from naslib.defaults.trainer import Trainer from naslib.optimizers import DARTSOptimizer, GDASOptimizer, RandomSearch from naslib.optimizers.discrete.re.optimizer import RegularizedEvolution from naslib.search_spaces import ( DartsSearchSpace, SimpleCellSearchSpace, NasBench201SeachSpace, HierarchicalSearchSpace, ) from naslib.utils import utils, setup_logger # Read args and config, setup logger config = utils.get_config_from_args() utils.set_seed(config.seed) logger = setup_logger(config.save + "/log.log") logger.setLevel(logging.INFO) # default DEBUG is too verbose utils.log_args(config) supported_optimizers = { 'darts': DARTSOptimizer(config.search), 'gdas': GDASOptimizer(config.search), 'random': RandomSearch(sample_size=1), #'re': RegularizedEvolution(config.search), } # search_space = SimpleCellSearchSpace()
import logging import sys import naslib as nl from naslib.defaults.predictor_evaluator import PredictorEvaluator from naslib.defaults.trainer import Trainer from naslib.optimizers import Bananas, OneShotNASOptimizer, RandomNASOptimizer from naslib.predictors import OneShotPredictor from naslib.search_spaces import NasBench101SearchSpace, NasBench201SearchSpace, DartsSearchSpace from naslib.utils import utils, setup_logger, get_dataset_api from naslib.utils.utils import get_project_root config = utils.get_config_from_args(config_type='oneshot') logger = setup_logger(config.save + "/log.log") logger.setLevel(logging.INFO) utils.log_args(config) supported_optimizers = { 'bananas': Bananas(config), 'oneshot': OneShotNASOptimizer(config), 'rsws': RandomNASOptimizer(config), } supported_search_spaces = { 'nasbench101': NasBench101SearchSpace(), 'nasbench201': NasBench201SearchSpace(), 'darts': DartsSearchSpace() }
from naslib.predictors import BayesianLinearRegression, BOHAMIANN, BonasPredictor, \ DNGOPredictor, EarlyStopping, Ensemble, GCNPredictor, GPPredictor, \ LCEPredictor, LCEMPredictor, LGBoost, MLPPredictor, NGBoost, OmniNGBPredictor, \ OmniSemiNASPredictor, RandomForestPredictor, SVR_Estimator, SemiNASPredictor, \ SoLosspredictor, SparseGPPredictor, VarSparseGPPredictor, XGBoost, ZeroCostV1, \ ZeroCostV2, GPWLPredictor from naslib.search_spaces.core.query_metrics import Metric from naslib.search_spaces import NasBench101SearchSpace, NasBench201SearchSpace, \ DartsSearchSpace, NasBenchNLPSearchSpace from naslib.utils import utils, setup_logger, get_dataset_api from naslib.utils.utils import get_project_root config = utils.get_config_from_args(config_type='predictor') utils.set_seed(config.seed) logger = setup_logger(config.save + "/log.log") logger.setLevel(logging.INFO) utils.log_args(config) supported_predictors = { 'bananas': Ensemble(predictor_type='bananas', num_ensemble=3, hpo_wrapper=True), 'bayes_lin_reg': BayesianLinearRegression(encoding_type='adjacency_one_hot'), 'bohamiann': BOHAMIANN(encoding_type='adjacency_one_hot'), 'bonas': BonasPredictor(encoding_type='bonas', hpo_wrapper=True), 'dngo':