How to load training_args
HiI wonder how I can load the training_args.bin?thanks
2021-04-23T13:12:00Z
it’s saved withtorchso you can just dotraining_args = torch.load(path_to_training_args)
2022-02-02T10:31:09Z
is it possible to push the training_args to the hub? tried push_to_hub and got the below error:“bool object is not callable”
2022-02-02T15:39:49Z
push_to_hubis an argument of theTrainingArgumentsclass, not a method. The training arguments will be automatically pushed to the Hub with everything inside theTrainerwhen you doTrainer.push_to_hub().
2023-01-09T00:59:26Z
have we use cuda for this? what if we just want to load it with cpu? I got some error.self.trainer = Trainer(model=model.to(self.device),args=torch.load(config[“DISTIL_BERT_TRAINING_ARGS”], map_location=self.device))the errorself.trainer = Trainer(File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\transformers\trainer.py”, line 438, ininitself._move_model_to_device(model, args.device)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\transformers\trainer.py”, line 681, in _move_model_to_devicemodel = model.to(device)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 987, in toreturn self._apply(convert)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 639, in _applymodule._apply(fn)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 639, in _applymodule._apply(fn)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 639, in _applymodule._apply(fn)[Previous line repeated 1 more time]File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 662, inapplyparam_applied = fn(param)File “C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\nn\modules\module.py”, line 985, in convertreturn t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)File "C:\Users\jabal.virtualenvs\bert-api-Li17HIRV\lib\site-packages\torch\cuda_init.py", line 221, in _lazy_initraise AssertionError(“Torch not compiled with CUDA enabled”)AssertionError: Torch not compiled with CUDA enabled