Skip to content

Commit

Permalink
fix type warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress committed Apr 23, 2024
1 parent bd203e6 commit 853c173
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ def to_container(
if isinstance(cfg, DictConfig):
ret = om.to_container(cfg, resolve=True)
assert isinstance(ret, dict)
return ret
return ret # type: ignore (return type is correct and converting all keys to str would be unnecessarily costly)
elif isinstance(cfg, ListConfig):
ret = om.to_container(cfg, resolve=True)
assert isinstance(ret, list)
return ret
return ret # type: ignore (see above)
else:
return cfg
return cfg # type: ignore (dicts and lists are already in the correct format)


T = TypeVar('T')
Expand Down

0 comments on commit 853c173

Please sign in to comment.