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
Describe the bug
When running the CP2K workflow with RelaxBandStructureMaker, a ValidationError occurs in the TaskDocument schema due to improper handling of the cp2k_input and locpot fields. The error message is as follows:
Traceback (most recent call last):
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/managers/local.py", line 114, in run_job
response = job.run(store=store)
^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/core/job.py", line 572, in run
self.resolve_args(store=store)
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/core/job.py", line 678, in resolve_args
resolved_args = find_and_resolve_references(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/core/reference.py", line 473, in find_and_resolve_references
resolved_references = resolve_references(
^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/core/reference.py", line 361, in resolve_references
resolved_references[ref] = ref.resolve(
^^^^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/jobflow/core/reference.py", line 179, in resolve
data = MontyDecoder().process_decoded(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/monty/json.py", line 777, in process_decoded
return cls(**d)
^^^^^^^^^
File "/opt/conda/envs/ai-dopant/lib/python3.12/site-packages/pydantic/main.py", line 176, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 2 validation errors for TaskDocument
calcs_reversed.0.input.cp2k_input
Input should be a valid dictionary [type=dict_type, input_value=<pymatgen.io.cp2k.inputs....bject at 0x7f4e4eb21640>, input_type=Cp2kInput]
For further information visit https://errors.pydantic.dev/2.7/v/dict_type
calcs_reversed.0.output.locpot
Input should be a valid dictionary [type=dict_type, input_value=None, input_type=NoneType]
The relaxation was completed without errors. I tried to print the calcs_reversed.0.input.cp2k_input, which seems to be a valid dictionary:
Describe the bug
When running the CP2K workflow with RelaxBandStructureMaker, a ValidationError occurs in the TaskDocument schema due to improper handling of the
cp2k_input
andlocpot
fields. The error message is as follows:The relaxation was completed without errors. I tried to print the
calcs_reversed.0.input.cp2k_input
, which seems to be a valid dictionary:and
calcs_reversed.0.output.locpot
isNone
.Here is the test script I'm running
To Reproduce
Steps to reproduce the behavior:
Additional Information:
I have identified the cause of this issue and have a fix ready. I will be submitting a PR soon to address this problem.
The text was updated successfully, but these errors were encountered: