mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 09:21:18 +08:00

* feat: add `update_config` finctionality - sorts the config for better readability - updates "_name_or_path" key in config with upload_repo - sets indentation of 4 spaces - allows adding other key-value pairs via kwargs - reduces code duplication - standardizes config-update across mlx-lm * feat: standardize updating config Impactes: - fuse.py - merge.py * update formatting * remove commented out code * update func: update_config to save_config - drop kwards - rename func as save_config - incorporate review suggestions * update func: save_config - ensure only config-saving functionality - function oes not return config as a dict anymore - added review suggestions * fixed formatting * update formatting instruction in contribution guide * nits --------- Co-authored-by: Awni Hannun <awni@apple.com>
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
# Contributing to mlx-examples
|
|
|
|
We want to make contributing to this project as easy and transparent as
|
|
possible.
|
|
|
|
## Pull Requests
|
|
|
|
1. Fork and submit pull requests to the repo.
|
|
2. If you've added code that should be tested, add tests.
|
|
3. Every PR should have passing tests and at least one review.
|
|
4. For code formatting install `pre-commit` using something like `pip install pre-commit` and run `pre-commit install`.
|
|
This should install hooks for running `black` and `clang-format` to ensure
|
|
consistent style for C++ and python code.
|
|
|
|
You can also run the formatters manually as follows on individual files:
|
|
|
|
```bash
|
|
clang-format -i file.cpp
|
|
```
|
|
|
|
```bash
|
|
black file.py
|
|
```
|
|
|
|
or,
|
|
|
|
```bash
|
|
# single file
|
|
pre-commit run --files file1.py
|
|
|
|
# specific files
|
|
pre-commit run --files file1.py file2.py
|
|
```
|
|
|
|
or run `pre-commit run --all-files` to check all files in the repo.
|
|
|
|
## Issues
|
|
|
|
We use GitHub issues to track public bugs. Please ensure your description is
|
|
clear and has sufficient instructions to be able to reproduce the issue.
|
|
|
|
## License
|
|
|
|
By contributing to mlx-examples, you agree that your contributions will be licensed
|
|
under the LICENSE file in the root directory of this source tree.
|