Exemple #1
0
def artifact_objs(sagemaker_session):
    artifact_objs = []
    for artifact_name in names():
        artifact_objs.append(
            artifact.Artifact.create(
                artifact_name=artifact_name,
                artifact_type="SDKIntegrationTest",
                source_uri=name(),
                properties={"k1": "v1"},
                sagemaker_session=sagemaker_session,
            ))
        time.sleep(SLEEP_TIME_SECONDS)

    artifact_objs.append(
        artifact.Artifact.create(
            artifact_name=name(),
            artifact_type="SDKIntegrationTestType2",
            source_uri=name(),
            properties={"k1": "v1"},
            sagemaker_session=sagemaker_session,
        ))

    yield artifact_objs

    for artifact_obj in artifact_objs:
        artifact_obj.delete()
def context_objs(sagemaker_session):
    context_objs = []
    for context_name in names():
        context_objs.append(
            context.Context.create(
                context_name=context_name,
                context_type="SDKIntegrationTest",
                source_uri="foo",
                properties={"k1": "v1"},
                sagemaker_session=sagemaker_session,
            ))
        time.sleep(SLEEP_TIME_SECONDS)

    yield context_objs
    for context_obj in context_objs:
        context_obj.delete()
def action_objs(sagemaker_session):
    action_objs = []
    for action_name in names():
        action_objs.append(
            action.Action.create(
                action_name=action_name,
                action_type="SDKIntegrationTest",
                source_uri="foo",
                status="InProgress",
                properties={"k1": "v1"},
                sagemaker_session=sagemaker_session,
            ))
        time.sleep(SLEEP_TIME_SECONDS)

    yield action_objs
    for action_obj in action_objs:
        action_obj.delete()