Skip to content

Commit

Permalink
delete output directory each run to keep things clean
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Dec 1, 2023
1 parent 10d87d8 commit 62509e2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pandas as pd
import yaml
from datta_lab_to_nwb.markowitz_gillis_nature_2023.convert_session import session_to_nwb
import shutil

folder_name_to_experiment_type = {
"_aggregate_results_arhmm_03": "reinforcement",
Expand Down Expand Up @@ -90,6 +91,10 @@ def dataset_to_nwb(
processed_path = Path("NWB/DattaConv/processed_data")
raw_dir_path = Path("NWB/DattaConv/raw_data")
output_dir_path = Path("NWB/DattaConv/conversion_output")
if output_dir_path.exists():
shutil.rmtree(
output_dir_path, ignore_errors=True
) # ignore errors due to MacOS race condition (https://github.com/python/cpython/issues/81441)
skip_experiments = {
"keypoint", # no proc folder for keypoints
}
Expand Down

0 comments on commit 62509e2

Please sign in to comment.