Spaces:
Runtime error
Runtime error
Lőrinc Pap
commited on
Fix colab incompatibilty
Browse filesFixes https://github.com/zetavg/LLaMA-LoRA-Tuner/issues/9
llama_lora/lib/csv_logger.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
import re
|
6 |
import secrets
|
7 |
from pathlib import Path
|
8 |
-
from typing import Any, List
|
9 |
|
10 |
class CSVLogger(FlaggingCallback):
|
11 |
"""
|
@@ -26,7 +26,7 @@ class CSVLogger(FlaggingCallback):
|
|
26 |
def setup(
|
27 |
self,
|
28 |
components: List[Any],
|
29 |
-
flagging_dir: str
|
30 |
):
|
31 |
self.components = components
|
32 |
self.flagging_dir = flagging_dir
|
@@ -36,7 +36,7 @@ class CSVLogger(FlaggingCallback):
|
|
36 |
self,
|
37 |
flag_data: List[Any],
|
38 |
flag_option: str = "",
|
39 |
-
username: str
|
40 |
filename="log.csv",
|
41 |
) -> int:
|
42 |
flagging_dir = self.flagging_dir
|
|
|
5 |
import re
|
6 |
import secrets
|
7 |
from pathlib import Path
|
8 |
+
from typing import Any, List, Union
|
9 |
|
10 |
class CSVLogger(FlaggingCallback):
|
11 |
"""
|
|
|
26 |
def setup(
|
27 |
self,
|
28 |
components: List[Any],
|
29 |
+
flagging_dir: Union[str, Path],
|
30 |
):
|
31 |
self.components = components
|
32 |
self.flagging_dir = flagging_dir
|
|
|
36 |
self,
|
37 |
flag_data: List[Any],
|
38 |
flag_option: str = "",
|
39 |
+
username: Union[str, None] = None,
|
40 |
filename="log.csv",
|
41 |
) -> int:
|
42 |
flagging_dir = self.flagging_dir
|