Ejemplo n.º 1
0
def test():
    with grpc.insecure_channel('127.0.0.1:6789') as channel:
        stub = api_pb2_grpc.ManagerStub(channel)
        register_experiment(stub)
        get_experiment(stub)
        update_experiment_status(stub)
        register_trial(stub)
        get_trial(stub)
        delete_experiment(stub)
        try:
            get_trial(stub)
        except:
            return 0
        else:
            exit(1)
Ejemplo n.º 2
0
def get_best_trial(trial_id):
    vizier_core = "vizier-core.kubeflow:6789"
    with grpc.insecure_channel(vizier_core) as channel:
        stub = api_pb2_grpc.ManagerStub(channel)
        response = stub.GetTrial(api_pb2.GetTrialRequest(trial_id=trial_id))
        return response.trial