Skip to content

list_runs doesn't work twice. Raises a ValueError about the name length of the run.  #3673

@JanetMatsen

Description

@JanetMatsen

Describe the bug
I have a dummy Sagemaker notebook where I use an experiment name BO-POC-synthetic-data.
When I list_runs for that experiment once, it works.
When I do list_runs for that experiment a second time, it makes

ValueError: The run_name (length: 73) must have length less than or equal to 59

To reproduce

from smexperiments.experiment import Experiment
from sagemaker.experiments.run import Run, load_run, list_runs

EXPERIMENT_NAME = "BO-POC-synthetic-data"

with Run(experiment_name=EXPERIMENT_NAME) as run:
    
    run.log_parameter("my_param", "AP") 
    run.log_metric("my_metric", 0.8)

    print(f"experiment name: {run.experiment_name}")
    print(run.experiment_config)

runs = list_runs(EXPERIMENT_NAME)      # <---- WORKS ONCE
runs = list_runs(EXPERIMENT_NAME)      # <---- FAILS SECOND TIME

Note that there are two trial components generated.
Conceptually, I'd only expect one trial component; why is there one with the experiment name repeated twice?
I suspect the longer one is causing the exception.
Screenshot 2023-02-21 at 2 00 35 PM

Expected behavior
I'd expect to be able to list-runs twice.

Screenshots or logs
Screenshot 2023-02-21 at 1 57 48 PM

Also, a zipped version of my Studio notebook:
JM-2023-02-21_bug_report_Sagemaker_Experiments_bug_report.html.zip

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.133.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): None
  • Framework version:
  • Python version: Python 3.9.11
  • CPU or GPU: CPU (sagemaker Studio)
  • Custom Docker image (Y/N): N

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions