Skip to content

Commit

Permalink
Fix bug in factory
Browse files Browse the repository at this point in the history
Signed-off-by: ashors1 <[email protected]>
  • Loading branch information
hemildesai authored and ashors1 committed Jul 18, 2024
1 parent 0147133 commit 71e36fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nemo/collections/llm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ def factory(*args: Any, **kwargs: Any) -> Union[Callable[[T], T], T]:
try:
import nemo_sdk as sdk

if not args and not kwargs:
# Used as @factory without arguments
return sdk.factory()
if not args:
return sdk.factory(**kwargs)
else:
# Used as @factory(*args, **kwargs)
return sdk.factory(*args, **kwargs)
Expand Down

0 comments on commit 71e36fb

Please sign in to comment.