|
| 1 | +# Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"). |
| 4 | +# You may not use this file except in compliance with the License. |
| 5 | +# A copy of the License is located at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# or in the "license" file accompanying this file. This file is distributed |
| 10 | +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 | +# express or implied. See the License for the specific language governing |
| 12 | +# permissions and limitations under the License. |
| 13 | +from __future__ import absolute_import |
| 14 | + |
| 15 | +import time |
| 16 | + |
| 17 | +import pytest |
| 18 | +from smexperiments.experiment import Experiment |
| 19 | + |
| 20 | + |
| 21 | +@pytest.mark.skip_py2_containers |
| 22 | +@pytest.mark.skip_test_in_region |
| 23 | +def test_experiments(sagemaker_session, ecr_image, instance_type, instance_count): |
| 24 | + sm = sagemaker_session.sagemaker_client |
| 25 | + |
| 26 | + experiment_name = f"tensorflow-container-integ-test-{int(time.time())}" |
| 27 | + |
| 28 | + created_experiment = Experiment.create( |
| 29 | + experiment_name=experiment_name, |
| 30 | + description="Integration test experiment from DLC", |
| 31 | + sagemaker_boto_client=sm |
| 32 | + ) |
| 33 | + print(created_experiment) |
| 34 | + |
| 35 | + experiment = Experiment.load(experiment_name=experiment_name, sagemaker_boto_client=sm) |
| 36 | + |
| 37 | + experiment.delete() |
0 commit comments