Пример #1
0
def trial_components(sagemaker_boto_client):
    trial_component_objs = [
        trial_component.TrialComponent.create(
            trial_component_name=trial_component_name, sagemaker_boto_client=sagemaker_boto_client
        )
        for trial_component_name in names()
    ]
    yield trial_component_objs
    for trial_component_obj in trial_component_objs:
        trial_component_obj.delete()
Пример #2
0
def experiments(sagemaker_boto_client):
    experiment_objs = [
        experiment.Experiment.create(
            experiment_name=experiment_name,
            sagemaker_boto_client=sagemaker_boto_client)
        for experiment_name in names()
    ]
    yield experiment_objs
    for experiment_obj in experiment_objs:
        experiment_obj.delete()
Пример #3
0
def experiments(sagemaker_boto_client):
    experiment_objs = []

    for experiment_name in names():
        experiment_objs.append(
            experiment.Experiment.create(experiment_name=experiment_name, sagemaker_boto_client=sagemaker_boto_client)
        )
        time.sleep(1)

    yield experiment_objs
    for experiment_obj in experiment_objs:
        experiment_obj.delete()
Пример #4
0
def trials(experiment_obj, sagemaker_boto_client):
    trial_objs = []
    for trial_name in names():
        next_trial = trial.Trial.create(
            trial_name=trial_name,
            experiment_name=experiment_obj.experiment_name,
            sagemaker_boto_client=sagemaker_boto_client)
        trial_objs.append(next_trial)
        time.sleep(0.5)
    yield trial_objs
    for trial_obj in trial_objs:
        trial_obj.delete()
Пример #5
0
def trial_components_in_trial(sagemaker_boto_client, trial_obj):
    trial_components = [
        trial_component.TrialComponent.create(
            trial_component_name=trial_component_name, sagemaker_boto_client=sagemaker_boto_client
        )
        for trial_component_name in names()
    ]
    for trial_component_obj in trial_components:
        trial_obj.add_trial_component(trial_component_obj)
    yield trial_components
    for trial_component_obj in trial_components:
        trial_obj.remove_trial_component(trial_component_obj)
        trial_component_obj.delete()