Maxime commited on
Commit
36b2e1c
1 Parent(s): 125cccb

tweak: use default config file when only one file is present (#501)

Browse files
Files changed (1) hide show
  1. scripts/finetune.py +4 -0
scripts/finetune.py CHANGED
@@ -153,6 +153,10 @@ def choose_config(path: Path):
153
  "No YAML config files found in the specified directory. Are you using a .yml extension?"
154
  )
155
 
 
 
 
 
156
  print("Choose a YAML file:")
157
  for idx, file in enumerate(yaml_files):
158
  print(f"{idx + 1}. {file}")
 
153
  "No YAML config files found in the specified directory. Are you using a .yml extension?"
154
  )
155
 
156
+ if len(yaml_files) == 1:
157
+ print(f"Using default YAML file '{yaml_files[0]}'")
158
+ return yaml_files[0]
159
+
160
  print("Choose a YAML file:")
161
  for idx, file in enumerate(yaml_files):
162
  print(f"{idx + 1}. {file}")