You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
main()
File "run.py", line 73, in main
preprocess.main(preprocess_config)
File "/app/ratsql/commands/preprocess.py", line 53, in main
preprocessor.preprocess()
File "/app/ratsql/commands/preprocess.py", line 30, in preprocess
data = registry.construct('dataset', self.config['data'][section])
File "/app/ratsql/utils/registry.py", line 32, in construct
return instantiate(
File "/app/ratsql/utils/registry.py", line 44, in instantiate
raise ValueError(f'Unsupported kind for param {name}: {param.kind}')
ValueError: Unsupported kind for param args: VAR_POSITIONAL
the base image ispytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel in the Dockerfile. python == 3.8.8
Any suggestion?
The text was updated successfully, but these errors were encountered:
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)
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
main()
File "run.py", line 73, in main
preprocess.main(preprocess_config)
File "/app/ratsql/commands/preprocess.py", line 53, in main
preprocessor.preprocess()
File "/app/ratsql/commands/preprocess.py", line 30, in preprocess
data = registry.construct('dataset', self.config['data'][section])
File "/app/ratsql/utils/registry.py", line 32, in construct
return instantiate(
File "/app/ratsql/utils/registry.py", line 44, in instantiate
raise ValueError(f'Unsupported kind for param {name}: {param.kind}')
ValueError: Unsupported kind for param args: VAR_POSITIONAL
the base image ispytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel in the Dockerfile. python == 3.8.8
Any suggestion?
The text was updated successfully, but these errors were encountered: