Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
xingzhongyu committed Oct 2, 2024
1 parent cbc4469 commit 26c73ba
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions get_result_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 26c73ba

Please sign in to comment.