def test_tutorial() -> None: exp_id1 = create_native_experiment(conf.tutorials_path("native-tf-keras"), ["python", "tf_keras_native.py"]) experiment.wait_for_experiment_state( exp_id1, "COMPLETED", max_wait_secs=conf.DEFAULT_MAX_WAIT_SECS) exp_id2 = create_native_experiment( conf.tutorials_path("native-tf-keras"), ["python", "tf_keras_native_hparam_search.py"]) experiment.wait_for_experiment_state( exp_id2, "COMPLETED", max_wait_secs=conf.DEFAULT_MAX_WAIT_SECS)
def test_pytorch_native_api() -> None: exp_id = exp.create_native_experiment(conf.fixtures_path("pytorch_no_op"), [sys.executable, "model_def.py"]) exp.wait_for_experiment_state(exp_id, "COMPLETED")
def test_tutorial_dtrain() -> None: exp_id = create_native_experiment(conf.tutorials_path("native-tf-keras"), ["python", "tf_keras_native_dtrain.py"]) experiment.wait_for_experiment_state( exp_id, "COMPLETED", max_wait_secs=conf.DEFAULT_MAX_WAIT_SECS)
def create_experiment(implementation: NativeImplementation) -> int: return create_native_experiment( implementation.cwd, implementation.command + ["--config", json.dumps(implementation.configuration)], )