Skip to content

Commit

Permalink
Update extract_test_data.py
Browse files Browse the repository at this point in the history
ignore folders and extract only files when extracting test data from batch folders
  • Loading branch information
TheAIWizard authored May 3, 2024
1 parent 6630f54 commit b16bbf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/extract_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

def transform_json_to_dataframe(json_dir: str):
transformed_data = []

for filename in tqdm(os.listdir(json_dir)):
files_only = [item for item in os.listdir(json_dir) if os.path.isfile(os.path.join(json_dir, item))]
for filename in tqdm(files_only):
with open(os.path.join(json_dir, filename), "r") as file:
data = json.load(file)

Expand Down

0 comments on commit b16bbf7

Please sign in to comment.