From 26c73bafacc4f4a5bad4ce06c1ce3bda73d64344 Mon Sep 17 00:00:00 2001 From: xzy Date: Thu, 3 Oct 2024 00:11:19 +0800 Subject: [PATCH] minor change --- get_result_web.py | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/get_result_web.py b/get_result_web.py index 8d79d857..726e4426 100644 --- a/get_result_web.py +++ b/get_result_web.py @@ -7,31 +7,32 @@ from dance.utils import try_import -# os.environ["http_proxy"]="http://121.250.209.147:7890" -# os.environ["https_proxy"]="http://121.250.209.147:7890" +os.environ["http_proxy"] = "http://121.250.209.147:7890" +os.environ["https_proxy"] = "http://121.250.209.147:7890" wandb = try_import("wandb") entity = "xzy11632" project = "dance-dev" collect_datasets = { "cta_actinn": [ - "84230ea4-998d-4aa8-8456-81dd54ce23af", "d3566d6a-a455-4a15-980f-45eb29114cab", - "4c4cd77c-8fee-4836-9145-16562a8782fe", "ae29ebd0-1973-40a4-a6af-d15a5f77a80f", - "bc260987-8ee5-4b6e-8773-72805166b3f7", "bc2a7b3d-f04e-477e-96c9-9d5367d5425c", - "d9b4bc69-ed90-4f5f-99b2-61b0681ba436" - ], - "cta_celltypist": [ - "4c4cd77c-8fee-4836-9145-16562a8782fe", "ae29ebd0-1973-40a4-a6af-d15a5f77a80f", - "bc260987-8ee5-4b6e-8773-72805166b3f7", "bc2a7b3d-f04e-477e-96c9-9d5367d5425c", - "d9b4bc69-ed90-4f5f-99b2-61b0681ba436", "01209dce-3575-4bed-b1df-129f57fbc031", + "471647b3-04fe-4c76-8372-3264feb950e8", "8a554710-08bc-4005-87cd-da9675bdc2e7", + "eeacb0c1-2217-4cf6-b8ce-1f0fedf1b569", "01209dce-3575-4bed-b1df-129f57fbc031", "055ca631-6ffb-40de-815e-b931e10718c0", "2a498ace-872a-4935-984b-1afa70fd9886", "2adb1f8a-a6b1-4909-8ee8-484814e2d4bf", "3faad104-2ab8-4434-816d-474d8d2641db" ], + "cta_celltypist": [ + "471647b3-04fe-4c76-8372-3264feb950e8", + "8a554710-08bc-4005-87cd-da9675bdc2e7", + "eeacb0c1-2217-4cf6-b8ce-1f0fedf1b569", + ], + "cta_scdeepsort": [ + "471647b3-04fe-4c76-8372-3264feb950e8", + "8a554710-08bc-4005-87cd-da9675bdc2e7", + "eeacb0c1-2217-4cf6-b8ce-1f0fedf1b569", + ], "cta_singlecellnet": [ - "4c4cd77c-8fee-4836-9145-16562a8782fe", "ae29ebd0-1973-40a4-a6af-d15a5f77a80f", - "bc260987-8ee5-4b6e-8773-72805166b3f7", "bc2a7b3d-f04e-477e-96c9-9d5367d5425c", - "d9b4bc69-ed90-4f5f-99b2-61b0681ba436", "01209dce-3575-4bed-b1df-129f57fbc031", - "055ca631-6ffb-40de-815e-b931e10718c0", "2a498ace-872a-4935-984b-1afa70fd9886", - "2adb1f8a-a6b1-4909-8ee8-484814e2d4bf", "3faad104-2ab8-4434-816d-474d8d2641db" + "471647b3-04fe-4c76-8372-3264feb950e8", + "8a554710-08bc-4005-87cd-da9675bdc2e7", + "eeacb0c1-2217-4cf6-b8ce-1f0fedf1b569", ] } file_root = "/home/zyxing/dance/examples/tuning" @@ -55,13 +56,16 @@ def check_identical_strings(string_list): # if s != first_string: # raise ValueError(f"发现不同的字符串: '{first_string}' 和 '{s}'") # return first_string -def get_sweep_url(step_csv: pd.DataFrame): +def get_sweep_url(step_csv: pd.DataFrame, single=True): ids = step_csv["id"] sweep_urls = [] - for run_id in tqdm(ids, leave=False): + for run_id in tqdm(reversed(ids), + leave=False): #The reversal of order is related to additional_sweep_ids.append(sweep_id) api = wandb.Api() run = api.run(f"/{entity}/{project}/runs/{run_id}") sweep_urls.append(run.sweep.url) + if single: + break sweep_url = check_identical_strings(sweep_urls) return sweep_url