Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanmai committed Jan 29, 2025
1 parent 51bb0c0 commit bb17e5c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/helm/benchmark/scenarios/spider_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,17 @@ def get_instances(self, output_path: str) -> List[Instance]:
unpack_type="unzip",
)
data_root_path = os.path.join(data_parent_path, "spider_data")
# databases_unzip_target = os.path.join(data_root_path, "unzipped_dev_databases")
# _ensure_file_unzipped(os.path.join(data_root_path, "dev_databases.zip"), databases_unzip_target)
# # Note: Zip file contains .DS_Store file at the root, which makes dev_databases unzip into a nested directory
databases_root_path = os.path.join(data_root_path, "test_database")

database_schema_prompts: Dict[str, str] = {}
for database_name in os.listdir(databases_root_path):
database_path = os.path.join(databases_root_path, database_name, f"{database_name}.sqlite")
print(database_path)
if not os.path.exists(database_path):
# Ignore stray ".DS_Store" directory
continue

database_schema_prompt = generate_schema_prompt(database_path, num_rows=None)
database_schema_prompts[database_name] = database_schema_prompt
print(database_schema_prompts)

instances: List[Instance] = []
dataset_path = os.path.join(data_root_path, "test.json")
Expand Down

0 comments on commit bb17e5c

Please sign in to comment.