Skip to content

Commit

Permalink
Merge pull request #924 from materialsproject/ml-doc-pydantic-schema-…
Browse files Browse the repository at this point in the history
…compliance

Remove 'model_' from ML doc field names
  • Loading branch information
janosh authored Jan 17, 2024
2 parents fdbd3a4 + c2b572d commit 8bfc343
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions emmet-builders/emmet/builders/materials/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
Defaults to None.
provenance (dict, optional): Additional provenance information to include in
MLDocs. Will be saved in each document so use sparingly. Defaults to None.
Set to {} to disable default provenance model_name, model_version, matcalc_version.
Set to {} to disable default provenance model, version, matcalc_version.
"""
self.materials = materials
self.ml_potential = ml_potential
Expand All @@ -55,8 +55,8 @@ def __init__(
model_name = {"chgnetcalculator": "chgnet"}.get(model_name, model_name)
pkg_name = {"m3gnet": "matgl"}.get(model_name, model_name)
self.provenance = dict(
model_name=model_name,
model_version=version(pkg_name),
model=model_name,
version=version(pkg_name),
matcalc_version=version("matcalc"),
**(provenance or {}),
)
Expand Down
4 changes: 2 additions & 2 deletions emmet-core/emmet/core/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class MLDoc(ElasticityDoc):
matcalc_version: Optional[str] = Field(
None, description="Version of matcalc used to generate this document"
)
model_name: Optional[str] = Field(
model: Optional[str] = Field(
None, description="Name of model used as ML potential."
)
model_version: Optional[str] = Field(
version: Optional[str] = Field(
None, description="Version of model used as ML potential"
)

Expand Down

0 comments on commit 8bfc343

Please sign in to comment.