From a248e50065e3f7b73e73514385690052983a6a9b Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Sat, 14 Dec 2024 19:16:41 -0800 Subject: [PATCH] Update (base update) [ghstack-poisoned] --- torchrl/_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchrl/_utils.py b/torchrl/_utils.py index 73f31c8ccf5..45f8c433725 100644 --- a/torchrl/_utils.py +++ b/torchrl/_utils.py @@ -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: