Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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")
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
def create_experiment(implementation: NativeImplementation) -> int:
    return create_native_experiment(
        implementation.cwd,
        implementation.command + ["--config", json.dumps(implementation.configuration)],
    )