Skip to content

Commit

Permalink
didn't account for None
Browse files Browse the repository at this point in the history
  • Loading branch information
calebrob6 committed Feb 23, 2024
1 parent eb65c25 commit f8d42f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchgeo/trainers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def __init__(self, ignore: Optional[Union[Sequence[str], str]] = None) -> None:
ignore: Arguments to skip when saving hyperparameters.
"""
super().__init__()
if isinstance(ignore, str):
if ignore is None:
ignore = ["ignore"]
elif isinstance(ignore, str):
ignore = [ignore, "ignore"]
else:
ignore = list(ignore) + ["ignore"]
Expand Down

0 comments on commit f8d42f2

Please sign in to comment.