publish pytorchmlx

This commit is contained in:
pj committed 2026-09-19 23:47:23 +05:30
1 parent cf90000071
commit fefdea2304
5 files changed
+35 -33

No files matched your search

+7 -7
View File
@@ -87,6 +87,13 @@ jobs:
if: steps.release.outputs.publish == 'true' if: steps.release.outputs.publish == 'true'
run: uv tool run twine check dist/* run: uv tool run twine check dist/*
- name: publish package
if: steps.release.outputs.publish == 'true'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: uv tool run twine upload --skip-existing --verbose dist/*
- name: create tag - name: create tag
if: steps.release.outputs.publish == 'true' && steps.release.outputs.create_tag == 'true' if: steps.release.outputs.publish == 'true' && steps.release.outputs.create_tag == 'true'
env: env:
@@ -95,13 +102,6 @@ jobs:
git tag "$TAG" "$GITHUB_SHA" git tag "$TAG" "$GITHUB_SHA"
git push origin "$TAG" git push origin "$TAG"
- name: publish package
if: steps.release.outputs.publish == 'true'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: uv tool run twine upload dist/*
- name: create github release - name: create github release
if: steps.release.outputs.publish == 'true' if: steps.release.outputs.publish == 'true'
env: env:
+3
View File
@@ -9,3 +9,6 @@ examples/tinystories-llm/TinyStoriesV2-GPT4-valid.txt
# Virtual environments # Virtual environments
.venv .venv
# Environment files
.env
+4 -5
View File
@@ -1,15 +1,14 @@
# torchmlx # torchmlx
torchmlx is a pytorch-shaped compatibility layer that uses mlx on apple silicon and pytorch elsewhere. torchmlx is a pytorch-shaped compatibility layer that uses mlx on apple silicon and pytorch elsewhere. it is experimental and built first for educational use.
NOTE: it is experimental and built first for educational use. If you find a bug, please create an issue on the repo. ```bash
pip install pytorchmlx
```
```python ```python
import torchmlx as torch import torchmlx as torch
from torchmlx import nn, optim from torchmlx import nn, optim
model = nn.Linear(4, 2)
optimizer = optim.AdamW(model.parameters(), lr=3e-4)
``` ```
see the [tinystories example](examples/tinystories-llm/train.py) and [compatibility details](docs/compatibility.md). see the [tinystories example](examples/tinystories-llm/train.py) and [compatibility details](docs/compatibility.md).
+2 -2
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "torchmlx" name = "pytorchmlx"
version = "0.1.0" version = "0.0.1"
description = "An educational PyTorch-shaped interface for MLX and PyTorch" description = "An educational PyTorch-shaped interface for MLX and PyTorch"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
Generated
+19 -19
View File
@@ -686,6 +686,25 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/a8/64/3708a90d1ebe202ffdeb7185f878a3c84d15c2b2c31858da2ce0583e2def/nvidia_nvtx-13.0.85-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb7780edb6b14107373c835bf8b72e7a178bac7367e23da7acb108f973f157a6", size = 148878 }, { url = "https://files.pythonhosted.org/packages/a8/64/3708a90d1ebe202ffdeb7185f878a3c84d15c2b2c31858da2ce0583e2def/nvidia_nvtx-13.0.85-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb7780edb6b14107373c835bf8b72e7a178bac7367e23da7acb108f973f157a6", size = 148878 },
] ]
[[package]]
name = "pytorchmlx"
version = "0.0.1"
source = { editable = "." }
dependencies = [
{ name = "mlx" },
{ name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
{ name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" },
{ name = "numpy", version = "2.5.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
{ name = "torch" },
]
[package.metadata]
requires-dist = [
{ name = "mlx", specifier = ">=0.32.2,<0.33" },
{ name = "numpy" },
{ name = "torch", specifier = ">=2.4,<3" },
]
[[package]] [[package]]
name = "setuptools" name = "setuptools"
version = "84.0.0" version = "84.0.0"
@@ -755,25 +774,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/f8/c3/72ae1f02747b1f012e1975743e48cd608f83095d7f9ce58de78b79248b35/torch-2.14.0-cp314-cp314t-win_amd64.whl", hash = "sha256:731784e3914843c6bcc7aba3987ff7610ac57dbbc816a5d6b9b62e04c240a641", size = 124400194 }, { url = "https://files.pythonhosted.org/packages/f8/c3/72ae1f02747b1f012e1975743e48cd608f83095d7f9ce58de78b79248b35/torch-2.14.0-cp314-cp314t-win_amd64.whl", hash = "sha256:731784e3914843c6bcc7aba3987ff7610ac57dbbc816a5d6b9b62e04c240a641", size = 124400194 },
] ]
[[package]]
name = "torchmlx"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "mlx" },
{ name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
{ name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" },
{ name = "numpy", version = "2.5.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },
{ name = "torch" },
]
[package.metadata]
requires-dist = [
{ name = "mlx", specifier = ">=0.32.2,<0.33" },
{ name = "numpy" },
{ name = "torch", specifier = ">=2.4,<3" },
]
[[package]] [[package]]
name = "triton" name = "triton"
version = "3.8.0" version = "3.8.0"