Skip to content

Commit

Permalink
Removing old doc. (#427)
Browse files Browse the repository at this point in the history
* Removing old doc.

* Update pyo3 to get clippy happy.

* Optional MLX install.

* Mlx only on python 3.10.
  • Loading branch information
Narsil authored Jan 17, 2024
1 parent 4ae1975 commit 3b752bb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
pip install .[jax]
shell: bash

- name: Install (mlx)
if: matrix.os == 'macos-latest' && matrix.version.python == "3.10"
run: |
pip install .[mlx]
shell: bash

- name: Check style
run: |
pip install .[quality]
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "safetensors_rust"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.19.2", features = ["extension-module"] }
pyo3 = { version = "0.20.2", features = ["extension-module"] }
memmap2 = "0.5"
serde_json = "1.0"

Expand Down
3 changes: 0 additions & 3 deletions bindings/python/py_src/safetensors/flax.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ def load_file(filename: Union[str, os.PathLike]) -> Dict[str, Array]:
Args:
filename (`str`, or `os.PathLike`)):
The name of the file which contains the tensors
device (`Dict[str, any]`, *optional*, defaults to `cpu`):
The device where the tensors need to be located after load.
available options are all regular flax device locations
Returns:
`Dict[str, Array]`: dictionary that contains name as key, value as `Array`
Expand Down
3 changes: 0 additions & 3 deletions bindings/python/py_src/safetensors/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ def load_file(filename: Union[str, os.PathLike]) -> Dict[str, np.ndarray]:
Args:
filename (`str`, or `os.PathLike`)):
The name of the file which contains the tensors
device (`Dict[str, any]`, *optional*, defaults to `cpu`):
The device where the tensors need to be located after load.
available options are all regular numpy device locations
Returns:
`Dict[str, np.ndarray]`: dictionary that contains name as key, value as `np.ndarray`
Expand Down
3 changes: 0 additions & 3 deletions bindings/python/py_src/safetensors/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ def load_file(filename: Union[str, os.PathLike]) -> Dict[str, tf.Tensor]:
Args:
filename (`str`, or `os.PathLike`)):
The name of the file which contains the tensors
device (`Dict[str, any]`, *optional*, defaults to `cpu`):
The device where the tensors need to be located after load.
available options are all regular tensorflow device locations
Returns:
`Dict[str, tf.Tensor]`: dictionary that contains name as key, value as `tf.Tensor`
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jax = [
"jax>=0.3.25",
"jaxlib>=0.3.25",
]
mlx = [
"mlx>=0.0.9",
]
paddlepaddle = [
"safetensors[numpy]",
"paddlepaddle>=2.4.1",
Expand Down

0 comments on commit 3b752bb

Please sign in to comment.