Closed saforem2 closed 9 months ago
I was getting TypeError: Config.__init__() missing 1 required positional argument: profiler' when trying to run examples/config_tiny_llama.py.
TypeError: Config.__init__() missing 1 required positional argument: profiler'
examples/config_tiny_llama.py
Explicitly:
$ python3 examples/config_tiny_llama.py Model has 16p4K parameters Traceback (most recent call last): File "/lus/grand/projects/datascience/foremans/locations/polaris/projects/saforem2/nanotron/examples/config_tiny_llama.py", line 90, in <module> config = Config( TypeError: Config.__init__() missing 1 required positional argument: 'profiler' [1] 30778 exit 1 python3 examples/config_tiny_llama.py 2.78s user 5.53s system 231% cpu 3.590s total
the issue is coming from this line in the Config object in src/nanotron/config/config.py:
Config
src/nanotron/config/config.py
https://github.com/huggingface/nanotron/blob/main/src/nanotron/config/config.py#L334
Setting the Optional[ProfilerArgs] = None by default (as shown below) fixes this:
Optional[ProfilerArgs] = None
@dataclass class Config: # [...] profiler: Optional[ProfilerArgs] = None
Fix #35
I was getting
TypeError: Config.__init__() missing 1 required positional argument: profiler'
when trying to runexamples/config_tiny_llama.py
.Explicitly:
the issue is coming from this line in the
Config
object insrc/nanotron/config/config.py
:https://github.com/huggingface/nanotron/blob/main/src/nanotron/config/config.py#L334
Setting the
Optional[ProfilerArgs] = None
by default (as shown below) fixes this: