mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 06:35:15 +00:00
Safer usage of mkdir across the project
This commit is contained in:
parent
8689d7ecea
commit
0d1597616f
16 changed files with 240 additions and 206 deletions
|
|
@ -27,7 +27,9 @@ def save_past_evaluations(df):
|
|||
global past_evaluations
|
||||
past_evaluations = df
|
||||
filepath = Path('user_data/logs/evaluations.csv')
|
||||
filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
if not filepath.parent.exists():
|
||||
filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
df.to_csv(filepath, index=False)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue