The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
CometExperimentManager (api_key:str=None, workspace:str=None)
Initialize self. See help(type(self)) for accurate signature.
# Initialize the manager
workspace = 'lunarlandercontinuous-v2'
project_name = 'refinputs-smooth'
manager = CometExperimentManager(workspace=workspace)
# Test get_all_artifacts_sorted
artifact_results = manager.get_all_artifacts_indexed()
# print("Artifacts sorted by source experiment key:", artifacts)
# Test get_experiments_by_metrics
experiments = manager.get_experiments_by_metrics(project_name=project_name, score_threshold=0.05, reward_threshold=10.0)
print("Filtered experiments:", experiments)
Filtered experiments: [<APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/319b8777136d4e059261d6e1582cded9'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/e6751db7179d4d6483ffd82985285f3e'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/39dfeda830bd4cf59759368a36bccb67'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/70d024308d024f24bcf4d9a7352ca775'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/bd30363071b74bc98582b51107cd38de'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/c888399ea415447d9c9954ca1f83f73d'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/620552456f29486fa2140e7afeeea053'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/5f14659ba5654ca4a7e894207f1b14e3'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/1d922993d9f7437693c6d66e2a4aa78b'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/873ef105d9004b9f81cff6caed888a5a'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/24798b73c782484d8e1b405f26260d2f'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/04a7b50f27484ec59e66c476ffd74dab'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/5dd88f8d7a8448718def12f01574d84a'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/47d2a0e0d59f4001ba27247a16a66c49'>, <APIExperiment 'lunarlandercontinuous-v2/refinputs-smooth/95089e886886457c8c4fb0e47bc2eecc'>]
# import random
# Test run_experiments_and_record_results
if experiments:
output_csv = "/tmp/artifacts/experiment_results.csv"
manager.run_experiments_and_record_results(experiments=experiments, project_name=project_name, artifact_results=artifact_results, num_runs=2, output_csv=output_csv)
print(f"Results saved to {output_csv}")
Running experiment 319b8777136d4e059261d6e1582cded9 in project refinputs-smooth with artifact ga-000.009-s001-1x6-m000-LL0061-1d7c4567db2419cd0699fc7dacd1e567.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment e6751db7179d4d6483ffd82985285f3e in project refinputs-smooth with artifact ga-000.011-s002-1x6-m001-LL0062-0a9e1c620271e5d3e0a02bcab106a413-consolidated.properties
Rewards: {'100': 1, '-100': 0, 'other': 1}
Running experiment 39dfeda830bd4cf59759368a36bccb67 in project refinputs-smooth with artifact ga-000.008-s003-1x6-m001-LL0062-d72a0f7fcd4502d784e75d34d3b5b8de-consolidated.properties
Rewards: {'100': 0, '-100': 2, 'other': 0}
Running experiment 70d024308d024f24bcf4d9a7352ca775 in project refinputs-smooth with artifact ga-000.013-s003-1x6-m002-LL0063-8b5293fa0a14cc94337149e8dcda75c9.properties
Rewards: {'100': 0, '-100': 2, 'other': 0}
Running experiment bd30363071b74bc98582b51107cd38de in project refinputs-smooth with artifact ga-000.016-s002-1x6-m002-LL0063-195351a8259720c330b329205b58788d.properties
Rewards: {'100': 0, '-100': 2, 'other': 0}
Running experiment c888399ea415447d9c9954ca1f83f73d in project refinputs-smooth with artifact ga-000.027-s003-1x6-m003-LL0064-e2111229242563028825f0d81614b289.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment 620552456f29486fa2140e7afeeea053 in project refinputs-smooth with artifact ga-000.002-s001-1x6-m003-LL0064-b7d8ffbd77713807f8bb8013d3adeb30.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment 5f14659ba5654ca4a7e894207f1b14e3 in project refinputs-smooth with artifact ga-000.012-s001-1x6-m004-LL0065-7fa4fd3d76713bab132f34e4c195adc7-consolidated.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment 1d922993d9f7437693c6d66e2a4aa78b in project refinputs-smooth with artifact ga-000.029-s002-1x6-m009-LL0069-4d682b51a4b8290142b8026171ec51da-consolidated.properties
Rewards: {'100': 1, '-100': 0, 'other': 1}
Running experiment 873ef105d9004b9f81cff6caed888a5a in project refinputs-smooth with artifact ga-000.025-s001-1x6-m009-LL0069-bf76f68ca626269b483e5651898ffe2c-consolidated.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment 24798b73c782484d8e1b405f26260d2f in project refinputs-smooth with artifact ga-000.003-s003-1x6-m009-LL0069-ce0088e445f815398df02017ed2ab9ff-consolidated.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Running experiment 04a7b50f27484ec59e66c476ffd74dab in project refinputs-smooth with artifact ga-000.001-s002-1x6-m011-LL0071-f2d83dfeddf17d1b316f4dd7180bb5b6-consolidated.properties
Rewards: {'100': 0, '-100': 1, 'other': 1}
Running experiment 5dd88f8d7a8448718def12f01574d84a in project refinputs-smooth with artifact ga-000.044-s002-1x6-m014-LL0074-e9f21b789827afb3b669f79043ad40a3-consolidated.properties
Rewards: {'100': 0, '-100': 2, 'other': 0}
Running experiment 47d2a0e0d59f4001ba27247a16a66c49 in project refinputs-smooth with artifact ga-000.047-s002-1x6-m017-LL0077-9ea6b48051cd9314a935ea62b6d6353f-consolidated.properties
Rewards: {'100': 0, '-100': 2, 'other': 0}
Running experiment 95089e886886457c8c4fb0e47bc2eecc in project refinputs-smooth with artifact ga-000.004-s001-1x6-m020-LL0080-357ef4ba877e2d577a72f9e4e6dc7847-consolidated.properties
Rewards: {'100': 1, '-100': 1, 'other': 0}
Results saved to /tmp/artifacts/experiment_results.csv