Skip to content

Commit 246f4b0

Browse files
committed
fix tests, use model_dump for pydantic base model
1 parent fe88050 commit 246f4b0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

alphafold3_pytorch/alphafold3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3069,7 +3069,7 @@ def save(self, path: str | Path, overwrite = False):
30693069
if isinstance(path, str):
30703070
path = Path(path)
30713071

3072-
assert path.is_file() and (not path.exists() or overwrite)
3072+
assert not path.is_dir() and (not path.exists() or overwrite)
30733073

30743074
path.parent.mkdir(exist_ok = True, parents = True)
30753075

alphafold3_pytorch/configs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ def from_yaml_file(path: str | Path):
6868
return Alphafold3Config(**config_dict)
6969

7070
def create_instance(self) -> Alphafold3:
71-
alphafold3 = Alphafold3(**self.dict())
71+
alphafold3 = Alphafold3(**self.model_dump())
7272
return alphafold3
7373

7474
def create_instance_from_yaml_file(path: str | Path) -> Alphafold3:
7575
af3_config = Alphafold3Config.from_yaml_file(path)
7676
return af3_config.create_instance()
77+
78+
class TrainerConfig(BaseModelWithExtra):
79+
pass

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "alphafold3-pytorch"
3-
version = "0.1.22"
3+
version = "0.1.23"
44
description = "Alphafold 3 - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "[email protected]" }

0 commit comments

Comments
 (0)