MLX backend implementation for Keras
Local development
For development, you need the keras repository and the keras-mlx
repository checked out locally. That's because the unit tests code is in the
keras repository.
We first check out the main keras repository and the pluggable_backend
branch.
gh repo clone keras-team/keras
cd keras
git checkout pluggable_backend
pip install -r requirements-common.txt
cd ..
Assuming you have a fork of keras-mlx, you will run the following. This also
installs keras-mlx locally so that keras can find and import the
keras-mlx module.
gh repo clone <your_github_handle>/keras-mlx
cd keras-mlx
pip install -r requirements.txt
pip install -e .
cd ..
Running tests happens from the root of the keras repository.
cd keras
KERAS_BACKEND=mlx pytest keras --ignore=keras/src/applications \
--ignore=keras/src/wrappers
Formatting the code
The code is formatted and linted with Ruff, run
through pre-commit. The first time you are setting up the repo, please run
pre-commit install. Note that this needs to be done only once at the
beginning.
Now, whenever you run git commit -m "<message>", the code is automatically
formatted and linted. If there's any error, the commit will not go through.
Please fix the error (most of the times, the error is fixed automatically by the
formatter/linter) and re-run the following:
git add .
git commit -m "<message>"
In case you want to run the above manually on all files, you can do the following:
pre-commit run --all-files
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keras_mlx-0.0.1.tar.gz.
File metadata
- Download URL: keras_mlx-0.0.1.tar.gz
- Upload date:
- Size: 73.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82d80b380f58108677afc5fbe6c1408b454dafdf7e60c6d1a758027fe55d326e
|
|
| MD5 |
7dccc80caef05f468578a5035f499a60
|
|
| BLAKE2b-256 |
432e8b992e07473699d14d0641cb30fc0bd88256daa80505340f06c86e6afa51
|
File details
Details for the file keras_mlx-0.0.1-py3-none-any.whl.
File metadata
- Download URL: keras_mlx-0.0.1-py3-none-any.whl
- Upload date:
- Size: 76.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d10fef556e2be3d123ff316179c6b3c888b48e072bf7330d85d74aa33baedc6
|
|
| MD5 |
b335cbe892aee6d062a9b8a38bb31244
|
|
| BLAKE2b-256 |
1e81bdc3a7ae1f8710611be2449bc7359d93c06d5b1b1a9d3b16a4154879249c
|