def test_mnist_tp_to_estimator() -> None: config = conf.load_config( conf.experimental_path("mnist_tp_to_estimator/const.yaml")) config = conf.set_max_steps(config, 2) exp.run_basic_test_with_temp_config( config, conf.experimental_path("mnist_tp_to_estimator"), 1)
def test_resnet50() -> None: config = conf.load_config( conf.experimental_path("resnet50_tf_keras/const.yaml")) config = conf.set_max_steps(config, 2) exp.run_basic_test_with_temp_config( config, conf.experimental_path("resnet50_tf_keras"), 1)
def test_efficientdet_coco_pytorch_const() -> None: config = conf.load_config( conf.cv_examples_path("efficientdet_pytorch/const_fake.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.cv_examples_path("efficientdet_pytorch"), 1)
def test_bert_glue() -> None: config = conf.load_config( conf.experimental_path("bert_glue_pytorch/const.yaml")) config = conf.set_max_steps(config, 2) exp.run_basic_test_with_temp_config( config, conf.experimental_path("bert_glue_pytorch/"), 1)
def test_tf_keras_const_warm_start(tf2: bool) -> None: config = conf.load_config(conf.official_examples_path("cifar10_cnn_tf_keras/const.yaml")) config = conf.set_max_steps(config, 2) config = conf.set_tf2_image(config) if tf2 else conf.set_tf1_image(config) experiment_id1 = exp.run_basic_test_with_temp_config( config, conf.official_examples_path("cifar10_cnn_tf_keras"), 1 ) trials = exp.experiment_trials(experiment_id1) assert len(trials) == 1 first_trial = trials[0] first_trial_id = first_trial["id"] assert len(first_trial["steps"]) == 2 first_checkpoint_id = first_trial["steps"][1]["checkpoint"]["id"] # Add a source trial ID to warm start from. config["searcher"]["source_trial_id"] = first_trial_id experiment_id2 = exp.run_basic_test_with_temp_config( config, conf.official_examples_path("cifar10_cnn_tf_keras"), 1 ) # The new trials should have a warm start checkpoint ID. trials = exp.experiment_trials(experiment_id2) assert len(trials) == 1 for trial in trials: assert trial["warm_start_checkpoint_id"] == first_checkpoint_id
def test_mmdetection_pytorch_const() -> None: config = conf.load_config( conf.cv_examples_path("mmdetection_pytorch/const_fake_data.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.cv_examples_path("mmdetection_pytorch"), 1)
def test_mnist_estimator_warm_start(tf2: bool) -> None: config = conf.load_config(conf.fixtures_path("mnist_estimator/single.yaml")) config = conf.set_tf2_image(config) if tf2 else conf.set_tf1_image(config) experiment_id1 = exp.run_basic_test_with_temp_config( config, conf.official_examples_path("trial/mnist_estimator"), 1 ) trials = exp.experiment_trials(experiment_id1) assert len(trials) == 1 first_trial = trials[0] first_trial_id = first_trial["id"] assert len(first_trial["steps"]) == 1 first_checkpoint_id = first_trial["steps"][0]["checkpoint"]["id"] config_obj = conf.load_config(conf.fixtures_path("mnist_estimator/single.yaml")) config_obj["searcher"]["source_trial_id"] = first_trial_id config_obj = conf.set_tf2_image(config_obj) if tf2 else conf.set_tf1_image(config_obj) experiment_id2 = exp.run_basic_test_with_temp_config( config_obj, conf.official_examples_path("trial/mnist_estimator"), 1 ) trials = exp.experiment_trials(experiment_id2) assert len(trials) == 1 assert trials[0]["warm_start_checkpoint_id"] == first_checkpoint_id
def test_pytorch_11_const(aggregation_frequency: int, using_k8s: bool) -> None: config = conf.load_config( conf.fixtures_path("mnist_pytorch/const-pytorch11.yaml")) config = conf.set_aggregation_frequency(config, aggregation_frequency) if using_k8s: pod_spec = { "metadata": { "labels": { "ci": "testing" } }, "spec": { "containers": [{ "name": "determined-container", "volumeMounts": [{ "name": "temp1", "mountPath": "/random" }], }], "volumes": [{ "name": "temp1", "emptyDir": {} }], }, } config = conf.set_pod_spec(config, pod_spec) exp.run_basic_test_with_temp_config(config, conf.tutorials_path("mnist_pytorch"), 1)
def test_gbt_estimator() -> None: config = conf.load_config( conf.experimental_path("trial/gbt_estimator/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/gbt_estimator"), 1)
def test_nas_search() -> None: config = conf.load_config( conf.experimental_path("trial/rsws_nas/train_one_arch.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/rsws_nas"), 1)
def test_imagenet_nas() -> None: config = conf.load_config( conf.experimental_path("trial/gaea_nas/eval/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/gaea_nas/eval"), 1)
def test_mnist_pytorch_multi_output() -> None: config = conf.load_config( conf.experimental_path("trial/mnist_pytorch_multi_output/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/mnist_pytorch_multi_output"), 1)
def test_resnet50() -> None: config = conf.load_config( conf.experimental_path("trial/resnet50_tf_keras/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/resnet50_tf_keras"), 1)
def test_bert_glue() -> None: config = conf.load_config( conf.experimental_path("trial/bert_glue_pytorch/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.experimental_path("trial/bert_glue_pytorch/"), 1)
def test_fashion_mnist_tf_keras_distributed() -> None: config = conf.load_config( conf.tutorials_path("fashion_mnist_tf_keras/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.tutorials_path("fashion_mnist_tf_keras"), 1)
def test_pytorch_const_with_amp(api_style: str) -> None: config = conf.load_config( conf.fixtures_path("pytorch_amp/" + api_style + "_amp.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config(config, conf.fixtures_path("pytorch_amp"), 1)
def test_mnist_estimator_distributed() -> None: config = conf.load_config( conf.cv_examples_path("mnist_estimator/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.cv_examples_path("mnist_estimator"), 1)
def test_protein_pytorch_geometric() -> None: config = conf.load_config( conf.graphs_examples_path("proteins_pytorch_geometric")) config = conf.set_max_length(config, {"epochs": 50}) exp.run_basic_test_with_temp_config( config, conf.graphs_examples_path("proteins_pytorch_geometric"), 1)
def test_unets_tf_keras_distributed() -> None: config = conf.load_config( conf.cv_examples_path("unets_tf_keras/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.cv_examples_path("unets_tf_keras"), 1)
def test_pix2pix_facades_const() -> None: config = conf.load_config( conf.gan_examples_path("pix2pix_tf_keras/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.gan_examples_path("pix2pix_tf_keras"), 1)
def test_bert_glue_pytorch_distributed() -> None: config = conf.load_config( conf.nlp_examples_path("bert_glue_pytorch/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.nlp_examples_path("bert_glue_pytorch"), 1)
def test_gan_mnist_pytorch_const() -> None: config = conf.load_config( conf.gan_examples_path("gan_mnist_pytorch/const.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.gan_examples_path("gan_mnist_pytorch"), 1)
def test_mnist_pytorch_multi_output() -> None: config = conf.load_config( conf.experimental_path("mnist_pytorch_multi_output/const.yaml")) config = conf.set_max_steps(config, 2) exp.run_basic_test_with_temp_config( config, conf.experimental_path("mnist_pytorch_multi_output"), 1)
def test_maskrcnn_distributed_fake() -> None: example_path = conf.fixtures_path("mmdetection") config = conf.load_config(os.path.join(example_path, "distributed_fake_data.yaml")) config = conf.set_max_length(config, {"batches": 200}) config = set_docker_image(config) exp.run_basic_test_with_temp_config(config, example_path, 1)
def test_mnist_estimator_adaptive_with_data_layer() -> None: config = conf.load_config( conf.fixtures_path("mnist_estimator/adaptive.yaml")) config = conf.set_tf2_image(config) config = conf.set_shared_fs_data_layer(config) exp.run_basic_test_with_temp_config( config, conf.experimental_path("data_layer_mnist_estimator"), None)
def test_gaea_pytorch_const() -> None: config = conf.load_config( conf.nas_examples_path("gaea_pytorch/eval/const.yaml")) config = conf.set_global_batch_size(config, 32) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config( config, conf.nas_examples_path("gaea_pytorch/eval"), 1)
def test_deepspeed_pipeline_parallel() -> None: config = conf.load_config(conf.deepspeed_examples_path("pipeline_parallelism/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) config = conf.set_min_validation_period(config, {"batches": 100}) exp.run_basic_test_with_temp_config( config, conf.deepspeed_examples_path("pipeline_parallelism"), 1 )
def test_word_language_lstm_const() -> None: config = conf.load_config(conf.nlp_examples_path("word_language_model/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) config = config.copy() config["hyperparameters"]["model_cls"] = "LSTM" config["hyperparameters"]["tied"] = False exp.run_basic_test_with_temp_config(config, conf.nlp_examples_path("word_language_model"), 1)
def test_gaea_pytorch_distributed() -> None: config = conf.load_config( conf.nas_examples_path("gaea_pytorch/eval/distributed_no_data_download.yaml") ) config = conf.set_global_batch_size(config, 256) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config(config, conf.nas_examples_path("gaea_pytorch/eval"), 1)
def test_mnist_pytorch_distributed() -> None: config = conf.load_config( conf.tutorials_path("mnist_pytorch/distributed.yaml")) config = conf.set_max_length(config, {"batches": 200}) exp.run_basic_test_with_temp_config(config, conf.tutorials_path("mnist_pytorch"), 1)