Skip to content

Commit 130ac54

Browse files
committed
-- fixing a bug with cpu trainer
1 parent 6c3c872 commit 130ac54

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/history.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ History
66

77
- First release on PyPI.
88

9+
0.2.0.dev0 (2021-02-03)
10+
------------------
11+
12+
- Fixed an issue with torch.clip and torch version
13+
- Fixed an issue with `gpus` parameter in TrainerConfig, by setting default value to `None` for CPU
14+

pytorch_tabular/config/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class TrainerConfig:
170170
171171
min_epochs (int): Minimum number of epochs to be run
172172
173-
gpus (int): The index of the GPU to be used. If zero, will use CPU
173+
gpus (int): The index of the GPU to be used. If `None`, will use CPU
174174
175175
accumulate_grad_batches (int): Accumulates grads every k batches or as set up in the dict.
176176
Trainer also calls optimizer.step() for the last indivisible step number.
@@ -227,9 +227,9 @@ class TrainerConfig:
227227
min_epochs: int = field(
228228
default=1, metadata={"help": "Minimum number of epochs to be run"}
229229
)
230-
gpus: int = field(
231-
default=0,
232-
metadata={"help": "The index of the GPU to be used. If zero, will use CPU"},
230+
gpus: Optional[int] = field(
231+
default=None,
232+
metadata={"help": "The index of the GPU to be used. If None, will use CPU"},
233233
)
234234
accumulate_grad_batches: int = field(
235235
default=1,

0 commit comments

Comments
 (0)