Skip to content

Commit a285eb5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fe0a626 commit a285eb5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pytorch_tabular/config/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ class DataConfig:
192192
)
193193

194194
def __post_init__(self):
195-
assert len(self.categorical_cols) + len(self.continuous_cols) + len(self.date_columns) > 0, (
196-
"There should be at-least one feature defined in categorical, continuous, or date columns"
197-
)
195+
assert (
196+
len(self.categorical_cols) + len(self.continuous_cols) + len(self.date_columns) > 0
197+
), "There should be at-least one feature defined in categorical, continuous, or date columns"
198198
_validate_choices(self)
199199
if os.name == "nt" and self.num_workers != 0:
200200
print("Windows does not support num_workers > 0. Setting num_workers to 0")
@@ -255,9 +255,9 @@ class InferredConfig:
255255

256256
def __post_init__(self):
257257
if self.embedding_dims is not None:
258-
assert all((isinstance(t, Iterable) and len(t) == 2) for t in self.embedding_dims), (
259-
"embedding_dims must be a list of tuples (cardinality, embedding_dim)"
260-
)
258+
assert all(
259+
(isinstance(t, Iterable) and len(t) == 2) for t in self.embedding_dims
260+
), "embedding_dims must be a list of tuples (cardinality, embedding_dim)"
261261
self.embedded_cat_dim = sum([t[1] for t in self.embedding_dims])
262262
else:
263263
self.embedded_cat_dim = 0

0 commit comments

Comments
 (0)