for hp in self.hpg.enumerate() ] return expts ''' Config Instances ''' B1 = Build(image_url='efnet:latest', build_steps=['docker build -t efnet:latest .']) Co1 = Container(build=B1) S1 = StorageDirs(working_dir='.', data_dir='/data/imagenette-160') L = LoggerConfig(mlflow=MLFlowConfig()) Re1 = Resources(storage=S1, ctr=Co1, loggers=L) H1 = HP(batch_size=32, epochs=1, gpu_id=0, model_name='efficientnet-b0') HPG1 = HPG(batch_size=16, epochs=1, gpu_id=0, model_name=['efficientnet-b0', 'efficientnet-b1']) # docker engine Ru1 = Run( cmd="python main.py {{run.data_dir}} --output-dir {{run.output_dir}}\ -a {{hp.model_name}} --pretrained -b {{hp.batch_size}} \ -j 0 --epochs {{hp.epochs}} --gpu {{hp.gpu_id}}", # --experiment_name {{er.run.experiment_name}} experiment_name="efnet0")
expts = [Experiment(er=self.er, hp=hp, run=self.run) for hp in hps] return expts ''' Config Instances ''' B1 = Build(image_url='pytorch_expt', build_steps=['docker build -t pytorch_expt .']) Co1 = Container(build=B1) S1 = StorageDirs(data_dir='./data') #L = LoggerConfig(names=['mlflow', 'trains']) Lm = MLFlowConfig(port=5000) L = LoggerConfig(mlflow=Lm) R1 = Resources(storage=S1, ctr=Co1, loggers=L) #or ctr=None # for k8 engine # replace multiple attributes, recursively R2 = rreplace(R1, { 'loggers.mlflow.client_in_cluster': True, 'loggers.mlflow.port': 30005, }) H1 = HPGroup(alpha=0.05, l1_ratio=[0.01, 0.015, 0.0015]) Ru1 = Run( cmd= "python train.py --data-dir {{run.data_dir}} --output-dir {{run.output_dir}} --alpha {{hp.alpha}} \
expts = [Experiment(er=self.er, hp=self.hp, run=self.run)] return expts[:1] ''' Config Instances ''' B1 = Build(image_url='tensorflow/tensorflow:latest-devel-gpu-py3', build_steps=[]) #'docker build -t xx .']) Ho1 = HostStore(working_dir='.', data_dir='./data') S1 = Storage(host=Ho1) Co1 = ContainerDirs() Lm = MLFlowConfig(client_in_cluster=False, port=5000) L = LoggerConfig(mlflow=Lm) from lightex.mulogger.trains_logger import TrainsConfig L.register_logger('trains', TrainsConfig()) R1 = Resources(build=B1, storage=S1, ctr=Co1, loggers=L) H1 = HP() Ru1 = Run( cmd="python tensorflow_mnist_with_summaries.py --data_dir {{run.data_dir}}\ --max_steps {{hp.max_steps}}\ --log_dir {{run.output_dir}}/logs\ --save_path {{run.output_dir}}/models/model.ckpt", experiment_name="tf_mnist_summ", )
def get_experiments(self): expts = [Experiment(er=self.er, hp=self.hp, run=self.run)] return expts ''' Config Instances ''' B1 = Build(image_url='ptlex:latest', build_steps=['docker build -t ptlex:latest .']) Co1 = Container(build=B1) S1 = StorageDirs(working_dir='.', data_dir='./data') Lm = MLFlowConfig() L = LoggerConfig(mlflow=Lm) Re1 = Resources(storage=S1, ctr=Co1, loggers=L) H1 = HP() Ru1 = Run(cmd="python mnist_tensorboard_artifact.py \ --data-dir {{run.data_dir}} \ --batch-size {{hp.batch_size}} \ --test-batch-size {{hp.test_batch_size}} \ --epochs {{hp.epochs}} \ --lr {{hp.lr}} \ --momentum {{hp.momentum}} \ --enable-cuda {{hp.enable_cuda}} \ --seed {{hp.seed}} \