Skip to content

Commit

Permalink
Feat: NumpyModel.load now has takes pre_load_modifier as argument
Browse files Browse the repository at this point in the history
Chore: Bump version, MINOR
Test: Fixed tests for NumpyModel
  • Loading branch information
caniko committed Mar 29, 2023
1 parent 3fe7e97 commit 7355d3a
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 123 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more examples see [test_ndarray.py](./tests/test_ndarray.py)

```python
import pydantic_numpy.dtype as pnd
from pydantic_numpy import NDArray, NDArrayFp32, NumpyModel, model_agnostic_load
from pydantic_numpy import NDArray, NDArrayFp32, NumpyModel


class MyPydanticNumpyModel(NumpyModel):
Expand All @@ -35,7 +35,7 @@ cfg.dump("path_to_dump_dir", "object_id")
cfg.load("path_to_dump_dir", "object_id")
```

`NumpyModel.load` requires the original mode, use `model_agnostic_load` when you have several models, and you want to load into a set of possible models.
`NumpyModel.load` requires the original mode, use `model_agnostic_load` when you have several models that may be the right model.

### Data type (dtype) support!

Expand Down
Loading

0 comments on commit 7355d3a

Please sign in to comment.