Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
empty tuple to None
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket Maurya committed Feb 12, 2021
1 parent 0b72e4c commit 101cee1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions flash/tabular/classification/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def __init__(
self,
train_df: DataFrame,
target: str,
categorical_input: List,
numerical_input: List,
categorical_input: Optional[List] = None,
numerical_input: Optional[List] = None,
valid_df: Optional[DataFrame] = None,
test_df: Optional[DataFrame] = None,
batch_size: int = 2,
Expand All @@ -82,7 +82,7 @@ def __init__(
dfs = [train_df]
self._test_df = None

if not categorical_input and not numerical_input:
if categorical_input is None and numerical_input is None:
raise RuntimeError('Both `categorical_input` and `numerical_input` are None!')

if categorical_input is None:
Expand Down Expand Up @@ -142,8 +142,8 @@ def from_df(
cls,
train_df: DataFrame,
target: str,
categorical_input: List = (),
numerical_input: List = (),
categorical_input: Optional[List] = None,
numerical_input: Optional[List] = None,
valid_df: Optional[DataFrame] = None,
test_df: Optional[DataFrame] = None,
batch_size: int = 8,
Expand Down Expand Up @@ -203,8 +203,8 @@ def from_csv(
cls,
train_csv: str,
target: str,
categorical_input: List = (),
numerical_input: List = (),
categorical_input: Optional[List] = None,
numerical_input: Optional[List] = None,
valid_csv: Optional[str] = None,
test_csv: Optional[str] = None,
batch_size: int = 8,
Expand Down

0 comments on commit 101cee1

Please sign in to comment.