Skip to content

Commit

Permalink
fix adapt bug (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
camillebrianceau authored Nov 10, 2023
1 parent 9be7d97 commit dac75d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clinicadl/tsvtools/adapt/adapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ def adapt(old_tsv_dir: Path, new_tsv_dir: Path, subset_name="labels", labels_lis
df_all, df_baseline = concat_files(path, df_baseline, df_all)

if not df_all.empty:
df_all.to_csv(str(new_tsv_dir / (subset_name + ".tsv")), sep="\t")
df_all.to_csv(str(new_tsv_dir / (subset_name + ".tsv")), sep="\t", index=False)

if not df_baseline.empty:
df_baseline.to_csv(str(new_tsv_dir / (subset_name + "_baseline.tsv")), sep="\t")
df_baseline.to_csv(
str(new_tsv_dir / (subset_name + "_baseline.tsv")), sep="\t", index=False
)

if (old_tsv_dir / "split.json") in files_list:
new_split_dir = new_tsv_dir / "split"
Expand Down

0 comments on commit dac75d5

Please sign in to comment.