Empty body of tracing context blows up
Closed this issue · 1 comments
arjunguha commented
This causes an exception:
model = LanguageModel("gpt2", dispatch=True)
with model.trace() as tracer:
pass
Exception:
{
"name": "TypeError",
"message": "Value after * must be an iterable, not NoneType",
"stack": "---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[43], line 1
----> 1 with model.trace() as tracer:
2 pass
File ~/miniconda3/lib/python3.11/site-packages/nnsight/contexts/Runner.py:49, in Runner.__exit__(self, exc_type, exc_val, exc_tb)
47 self._graph = None
48 else:
---> 49 super().__exit__(exc_type, exc_val, exc_tb)
File ~/miniconda3/lib/python3.11/site-packages/nnsight/contexts/Tracer.py:69, in Tracer.__exit__(self, exc_type, exc_val, exc_tb)
66 if isinstance(exc_val, BaseException):
67 raise exc_val
---> 69 output = self._model.interleave(
70 self._model._execute,
71 self._graph,
72 *self._batched_input,
73 **self._kwargs,
74 )
76 self._graph.tracing = False
77 self._graph = None
TypeError: Value after * must be an iterable, not NoneType"
}
Sorry for the stupid request.
JadenFiotto-Kaufman commented
@arjunguha Fixed in latest version