We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3bee7f commit 4140411Copy full SHA for 4140411
train.py
@@ -14,6 +14,7 @@
14
from optimizers import build_optimizer
15
from data.ft_dataset import build_ft_dataloader
16
from hf_utils import load_custom_model_from_hf
17
+import shutil
18
19
20
@@ -36,7 +37,7 @@ def __init__(self,
36
37
self.log_dir = os.path.join(config['log_dir'], run_name)
38
os.makedirs(self.log_dir, exist_ok=True)
39
# copy config file to log dir
- os.system(f'cp {config_path} {self.log_dir}')
40
+ shutil.copyfile(config_path, os.path.join(self.log_dir, os.path.basename(config_path)))
41
batch_size = config.get('batch_size', 10) if batch_size == 0 else batch_size
42
self.max_steps = steps
43
0 commit comments