Skip to content

Commit

Permalink
Handle NoneType feature kwarg from emle-server.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Jun 24, 2024
1 parent cd630bd commit e32fa42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/emle-server
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ parser.add_argument(
"--features",
type=str,
help="the type of feature used by the model ('soap' or 'aev')",
choices=["soap", "aev"],
required=False,
)
parser.add_argument(
Expand Down
2 changes: 2 additions & 0 deletions emle/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,8 @@ def __init__(
"cuda" if _torch.cuda.is_available() else "cpu"
)

if features is None:
features = "soap"
if not isinstance(features, str):
msg = "'features' must be of type 'str'"
_logger.error(msg)
Expand Down

0 comments on commit e32fa42

Please sign in to comment.