Traceback (most recent call last):
File ".../tmp.py", line 5, in <module>
def func(a, *bs, batch_size: int):
File ".../venv/venv-cpu/lib/python3.8/site-packages/torch_max_mem/api.py", line 274, in __call__
wrapped = maximize_memory_utilization_decorator(
File ".../venv/venv-cpu/lib/python3.8/site-packages/torch_max_mem/api.py", line 150, in decorator_maximize_memory_utilization
raise ValueError(f"{parameter_name} must be a keyword based parameter, but is {_parameter.kind}.")
ValueError: batch_size must be a keyword based parameter, but is KEYWORD_ONLY.
since _parameter.kind is KEYWORD_ONLY.
This is overly restrictive, since we only need keyword-based parameters.
The following snippet
raises an error
since
_parameter.kind
isKEYWORD_ONLY
.This is overly restrictive, since we only need keyword-based parameters.