"git@developer.sourcefind.cn:one/TransferBench.git" did not exist on "569287a74a72a7e2ded5f5b745c6fa1b29f320c0"
Unverified Commit afee044b authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[GraphBolt] fix bug in pydantic 1.x (#6607)

parent f915ceed
......@@ -47,7 +47,7 @@ class ExtraMetaData(pydantic.BaseModel, extra="allow"):
def build_extra(cls, values: Dict[str, Any]) -> Dict[str, Any]:
"""Build extra fields."""
for key in list(values.keys()):
if key not in ["train_set", "validation_set", "test_set"]:
if key not in cls.__fields__:
values["extra_fields"] = values.get("extra_fields", {})
values["extra_fields"][key] = values.pop(key)
return values
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment