Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Dec 15, 2024
1 parent 5259e6e commit b26b9d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchrl/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,11 @@ def compile_with_warmup(*args, warmup: int, **kwargs):
>>> # First 10 calls use the original model
>>> # After 10 calls, the model is compiled and used
"""

if len(args):
model = args[0]
args = ()
else:
model = kwargs.get("model")
model = kwargs.pop("model", None)
if model is None:
return lambda model: compile_with_warmup(model, warmup=warmup, **kwargs)
else:
Expand Down

0 comments on commit b26b9d3

Please sign in to comment.