preporcessing issue
when I run preprocessing script (python run.py preprocess experiments/spider-bert-run.jsonnet), it gives me the following error:
Traceback (most recent call last):
File "run.py", line 109, in
the base image ispytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel in the Dockerfile. python == 3.8.8 Any suggestion?
I had a similar issue. This disappeared magically when I changed my version to Pytorch 1.5.1 with 10.1 cuda.
Would be interested to see if someone could update it to more recent version.
It is because the inspect.signature doesn't support your pytorch dataset version. A workaround could be modifying the registry.py file as following:
def instantiate(callable, config, unused_keys=(), **kwargs):
merged = {**config, **kwargs}
if 'dataset' in str(callable):
signature = inspect.signature(callable.__init__)
else:
signature = inspect.signature(callable)
for name, param in signature.parameters.items():
if param.kind in (inspect.Parameter.POSITIONAL_ONLY, inspect.Parameter.VAR_POSITIONAL):
raise ValueError(f'Unsupported kind for param {name}: {param.kind}')
if any(param.kind == inspect.Parameter.VAR_KEYWORD for param in signature.parameters.values()):
return callable(**merged)
missing = {}
for key in list(merged.keys()):
if key not in signature.parameters:
if key not in unused_keys:
missing[key] = merged[key]
merged.pop(key)
if missing:
print(f'WARNING {callable}: superfluous {missing}', file=sys.stderr)
return callable(**merged)