Spaces:
Sleeping
Sleeping
Update src/saving_utils.py
Browse files6 unmodified lines7891011121354 unmodified lines6869707172737458 unmodified lines13313413513613713813930 unmodified lines1701711721731741751766 unmodified linessys.path.append('..')sys.path.append('.')def save_similarity_output(output_dict, method_name, leaderboard_path="/home/user/app/src/data/leaderboard_results.csv", similarity_path="./data/similarity_results.csv"):# Load or initialize the DataFramesprint(script_dir)if os.path.exists(leaderboard_path):54 unmodified linesreturn 0def save_function_output(model_output, method_name, func_results_path="./data/function_results.csv", leaderboard_path="./data/leaderboard_results.csv"):# Load or initialize the DataFramesif os.path.exists(func_results_path):func_results_df = pd.read_csv(func_results_path)58 unmodified linesreturn 0def save_family_output(model_output, method_name, leaderboard_path="./data/leaderboard_results.csv", family_results_path="./data/family_results.csv"):# Load or initialize the DataFramesif os.path.exists(leaderboard_path):leaderboard_df = pd.read_csv(leaderboard_path)30 unmodified linesreturn leaderboard_df, family_results_dfdef save_affinity_output(model_output, method_name, leaderboard_path="./data/leaderboard_results.csv", affinity_results_path="./data/affinity_results.csv"):# Load or initialize DataFramesif os.path.exists(leaderboard_path):leaderboard_df = pd.read_csv(leaderboard_path)6 unmodified lines7891011121354 unmodified lines6869707172737458 unmodified lines13313413513613713813930 unmodified lines1701711721731741751766 unmodified linessys.path.append('..')sys.path.append('.')def save_similarity_output(output_dict, method_name, leaderboard_path="/home/user/app/src/data/leaderboard_results.csv", similarity_path="/home/user/app/src/data/similarity_results.csv"):# Load or initialize the DataFramesprint(script_dir)if os.path.exists(leaderboard_path):54 unmodified linesreturn 0def save_function_output(model_output, method_name, func_results_path="/home/user/app/src/data/function_results.csv", leaderboard_path="/home/user/app/src/data/leaderboard_results.csv"):# Load or initialize the DataFramesif os.path.exists(func_results_path):func_results_df = pd.read_csv(func_results_path)58 unmodified linesreturn 0def save_family_output(model_output, method_name, leaderboard_path="/home/user/app/src/data/leaderboard_results.csv", family_results_path="/home/user/app/src/data/family_results.csv"):# Load or initialize the DataFramesif os.path.exists(leaderboard_path):leaderboard_df = pd.read_csv(leaderboard_path)30 unmodified linesreturn leaderboard_df, family_results_dfdef save_affinity_output(model_output, method_name, leaderboard_path="/home/user/app/src/data/leaderboard_results.csv", affinity_results_path="/home/user/app/src/data/affinity_results.csv"):# Load or initialize DataFramesif os.path.exists(leaderboard_path):leaderboard_df = pd.read_csv(leaderboard_path)
src/saving_utils.py+4-4