Replies: 1 comment 21 replies
-
Hi @JohnFengg. Thanks for the report. I'd be happy to help. The error you are seeing is likely a Pydantic compatibility issue. In short, the entire Materials Project software stack (including Jobflow) transitioned from Pydantic v1 to Pydantic v2 recently. These two versions of Pydantic are not intercomparable. My assumption is that one of your dependencies is for an older version running on Pydantic v1. Can you please do the following:
We can debug from there. Also, just as a note, I wish to emphasize that the MP workflows in quacc are merely for demonstration purposes only at the moment. The one true source of MP workflows is in atomate2. I make no guarantees of 1:1 compatibility at the moment, as the MP workflow in atomate2 was only just added the other day, and further validation is needed to ensure they match (for instance, see this PR). |
Beta Was this translation helpful? Give feedback.
-
I'm trying to using QUACC package with JOBFLOW wf engine to run a job, my script is like this (got an error before testing if this scripts can work):
####extract the atom objects from database ####
from ase.db import connect
from quacc.recipes.vasp.mp import mp_relax_flow
from quacc.wflow.db import results_to_db
database_path = 'perovskites.db'
db = connect(database_path)
batch_size = 1 #number of structure calculated simultaneously
for i in range(0, 1, batch_size):
structures = db[i:i + batch_size]
flow=mp_relax_flow()
#pre_relax={atoms=structures, preset="MPScanSet", calc_swaps= None, copy_files=None}
results = flow(
structures,
prerelax_job_kwargs=None,
relax_job_kwargs=None,
)
db.close()
when I run the scripts, there is an error:
Traceback (most recent call last):
File "/home/toussaint/high-throughput/model-run.py", line 3, in
from quacc.recipes.vasp.mp import mp_relax_flow
File "/home/toussaint/opt/miniconda3/envs/quacc/lib/python3.10/site-packages/quacc/init.py", line 11, in
from quacc.settings import QuaccSettings
File "/home/toussaint/opt/miniconda3/envs/quacc/lib/python3.10/site-packages/quacc/settings.py", line 22, in
import jobflow
File "/home/toussaint/opt/miniconda3/envs/quacc/lib/python3.10/site-packages/jobflow/init.py", line 14, in
SETTINGS = JobflowSettings()
File "pydantic/env_settings.py", line 40, in pydantic.env_settings.BaseSettings.init
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for JobflowSettings
docs_store
extra fields not permitted (type=value_error.extra)
I have created a jobflow.yaml file and export the path in ~/.bashrc, and it seems like there are no error about the yaml files:
docs_store:
type: MongoStore
host: localhost
port: 27017
database: ase
collection_name: ase
username: toussaint
password: toussaint
I dont know how to fix this, could anyone help me for this?
Beta Was this translation helpful? Give feedback.
All reactions