From 864747e81747814c66772e47d21401b24852231d Mon Sep 17 00:00:00 2001 From: xzy Date: Wed, 13 Nov 2024 02:58:42 -0500 Subject: [PATCH] minor change --- examples/sc_similarity_examples/sim_query_atlas.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/sc_similarity_examples/sim_query_atlas.py b/examples/sc_similarity_examples/sim_query_atlas.py index de0c2b5b..de783f20 100644 --- a/examples/sc_similarity_examples/sim_query_atlas.py +++ b/examples/sc_similarity_examples/sim_query_atlas.py @@ -1,4 +1,5 @@ import argparse +from pathlib import Path import pandas as pd @@ -21,6 +22,8 @@ from dance.utils import try_import +file_root = str(Path(__file__).resolve().parent.parent) + def find_unique_matching_row(df, config_col, input_dict_list): """在 DataFrame 中查找指定列中与输入字典列表匹配的唯一一行。 @@ -70,7 +73,7 @@ def is_match(config_str): def get_ans(query_dataset, method): - data = pd.read_csv(f"/home/zyxing/dance/examples/tuning/{method}/{query_dataset}/results/atlas/best_test_acc.csv") + data = pd.read_csv(f"{file_root}/tuning/{method}/{query_dataset}/results/atlas/best_test_acc.csv") sweep_url = get_sweep_url(data) _, _, sweep_id = spilt_web(sweep_url) sweep = wandb.Api().sweep(f"{entity}/{project}/{sweep_id}")