Skip to content

Commit

Permalink
Check for superset instead of set equality.
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein committed Jun 18, 2024
1 parent f5d0aa3 commit c7d6ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metalearners/metalearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def _get_result_skeleton(


def _initialize_model_dict(argument, expected_names: Collection[str]) -> dict:
if isinstance(argument, dict) and set(argument.keys()) == set(expected_names):
return argument
if isinstance(argument, dict) and set(argument.keys()) >= set(expected_names):
return {key: argument[key] for key in expected_names}
return {name: argument for name in expected_names}


Expand Down

0 comments on commit c7d6ef2

Please sign in to comment.