try:
response = PolyaxonClients().experiment.get_experiment(user, project_name, experiment)
// Set caching
ExperimentManager.set_config(response)
except (PolyaxonHTTPError, PolyaxonShouldExitError) as e:
Printer.print_error("Could not load experiment `{}` info.".format(experiment))
Printer.print_error("Error message `{}`.".format(e))
sys.exit(1)
After Change
try:
response = PolyaxonClients().experiment.get_experiment(user, project_name, experiment)
// Set caching only if we have an initialized project
if ProjectManager.is_initialized():
ExperimentManager.set_config(response)
except (PolyaxonHTTPError, PolyaxonShouldExitError) as e:
Printer.print_error("Could not load experiment `{}` info.".format(experiment))
Printer.print_error("Error message `{}`.".format(e))
sys.exit(1)