Describe the bug
Currently, the documentation Input Docs states that msa behaviour can be controlled at the chain level.
However the msa related keys: "use_msas", "use_paired_msas", and "use_main_msas" are validated only at the Query level and not inherited by the chain class.
This results in a validation error when attempting to control msa behaviour at chain level. I.E. when any of the above keys are defined within a chain section, e.g. as the example input example shows.
To Reproduce
A minimal json to reproduce the issue, this is directly taken from the example linked previously.
{
"queries": {
"query_1": {
"chains": [
{
"molecule_type": "protein",
"chain_ids": "A",
"sequence": "PVLSCGEWQCL",
"use_msas": true,
"use_main_msas": true,
"use_paired_msas": true
}
]
}
}
}
No custom runners were used; and the simple command:
run_openfold predict --query-json=msa_error.json
was used.
Expected behavior
The msa settings should be parsed and applied to the specific chain, following which inference would go on as normal.
Stack trace
Traceback (most recent call last):
File "/usr/local/bin/run_openfold", line 7, in <module>
sys.exit(cli())
~~~^^
File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1485, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/openfold3/run_openfold.py", line 191, in predict
query_set = InferenceQuerySet.from_json(query_json)
File "/usr/local/lib/python3.13/site-packages/openfold3/projects/of3_all_atom/config/inference_query_format.py", line 98, in from_json
return cls.model_validate_json(data)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/pydantic/main.py", line 766, in model_validate_json
return cls.__pydantic_validator__.validate_json(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
json_data, strict=strict, extra=extra, context=context, by_alias=by_alias, by_name=by_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
pydantic_core._pydantic_core.ValidationError: 3 validation errors for InferenceQuerySet
queries.query_1.chains.0.use_msas
Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]
For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden
queries.query_1.chains.0.use_main_msas
Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]
For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden
queries.query_1.chains.0.use_paired_msas
Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]
For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden
Configuration (please complete the following information):
- OS: Ubuntu 22.04.5 LTS - Container base image: Docker: python:3.13-bookworm (Debian)
- GPU: RTX 4060 Ti 16GB (Higher memory GPU's also available, however this issue newer gets to allocate anything :) )
- Python version (if relevant): 3.13
- Installation path: Containerized with apptainer, package built from repo.
Describe the bug
Currently, the documentation Input Docs states that msa behaviour can be controlled at the chain level.
However the msa related keys: "use_msas", "use_paired_msas", and "use_main_msas" are validated only at the Query level and not inherited by the chain class.
This results in a validation error when attempting to control msa behaviour at chain level. I.E. when any of the above keys are defined within a chain section, e.g. as the example input example shows.
To Reproduce
A minimal json to reproduce the issue, this is directly taken from the example linked previously.
No custom runners were used; and the simple command:
run_openfold predict --query-json=msa_error.jsonwas used.
Expected behavior
The msa settings should be parsed and applied to the specific chain, following which inference would go on as normal.
Stack trace
Configuration (please complete the following information):