Skip to content

Commit 06e9589

Browse files
committed
Fix TrainerConfig.precision to be a string and
remove integer choices. Add a pointer to docs with possible options
1 parent f1f116e commit 06e9589

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/pytorch_tabular/config/config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ class TrainerConfig:
358358
359359
progress_bar (str): Progress bar type. Can be one of: `none`, `simple`, `rich`. Defaults to `rich`.
360360
361-
precision (int): Precision of the model. Can be one of: `32`, `16`, `64`. Defaults to `32`..
362-
Choices are: [`32`,`16`,`64`].
361+
precision (str): Precision of the model. Defaults to `32`. See
362+
https://lightning.ai/docs/pytorch/stable/common/trainer.html#precision
363363
364364
seed (int): Seed for random number generators. Defaults to 42
365365
@@ -543,11 +543,10 @@ class TrainerConfig:
543543
default="rich",
544544
metadata={"help": "Progress bar type. Can be one of: `none`, `simple`, `rich`. Defaults to `rich`."},
545545
)
546-
precision: int = field(
547-
default=32,
546+
precision: str = field(
547+
default="32",
548548
metadata={
549-
"help": "Precision of the model. Can be one of: `32`, `16`, `64`. Defaults to `32`.",
550-
"choices": [32, 16, 64],
549+
"help": "Precision of the model. Defaults to `32`.",
551550
},
552551
)
553552
seed: int = field(

0 commit comments

Comments
 (0)