diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000..bafcfc0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,29 @@ +--- +name: 🐛 Bug Report +about: Submit a bug report to help us improve +labels: bug, triage +--- + +## 🐛 Bug Report + + + +## To Reproduce + + + +## Your Environment + + + +**Please fill this part, failure to do so will lead to your issue being directly closed.** + +- Backend impacted (Torch, MLX, or Rust): +- Operating system (OSX, Windows, Linux): +- Operating system version: + +If the backend impacted is Torch: +- Python version: +- PyTorch version: +- CUDA version (run `python -c 'import torch; print(torch.version.cuda)'`): +- GPU model and memory: diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..a074579 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,9 @@ +--- +name: "❓Questions/Help/Support" +about: If you have a question about the paper, code or algorithm, please ask here! +labels: question, triage +--- + +## ❓ Questions + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8ae0569 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +# Test diff --git a/.github/actions/moshi_build/action.yml b/.github/actions/moshi_build/action.yml new file mode 100755 index 0000000..8159e80 --- /dev/null +++ b/.github/actions/moshi_build/action.yml @@ -0,0 +1,21 @@ +name: moshi_build +description: 'Build env.' +runs: + using: "composite" + steps: + - uses: actions/setup-python@v2 + with: + python-version: '3.10' + - uses: actions/cache@v3 + id: cache + with: + path: env + key: env-${{ hashFiles('moshi/pyproject.toml') }} + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -m venv env + . env/bin/activate + python -m pip install --upgrade pip + pip install -e './moshi[dev]' diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 0000000..fba7d72 --- /dev/null +++ b/.github/workflows/precommit.yml @@ -0,0 +1,17 @@ +name: precommmit +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + run_precommit: + name: Run precommit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./.github/actions/moshi_build + - run: | + . env/bin/activate + bash .git/hooks/pre-commit diff --git a/rust/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml similarity index 100% rename from rust/.github/workflows/rust-ci.yml rename to .github/workflows/rust-ci.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..af18af5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing to Moshi + +## Pull Requests + +Moshi is the implementation of a research paper. +Therefore, we do not plan on accepting many pull requests for new features. +We certainly welcome them for bug fixes. + +1. Fork the repo and create your branch from `main`. +2. If you've changed APIs, update the documentation. +3. Ensure pre-commit hooks pass properly, in particular the linting and typing. +4. Accept the Contributor License Agreement (see after). + +Note that in general we will not accept refactoring of the code. + + +## Contributor License Agreement ("CLA") + +In order to accept your pull request, we need you to submit a Contributtor License Agreement. +As this CLA is not ready yet, we will delay acceptance of your PR. + +## Issues + +Please submit issues on our Github repository. + +## License + +By contributing to Moshi, you agree that your contributions will be licensed +under the LICENSE-* files in the root directory of this source tree. +In particular, the rust code is licensed under APACHE, and the python code under MIT. diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index 29da569..4b77729 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -25,3 +25,11 @@ build-backend = "setuptools.build_meta" [tool.setuptools] packages = ["moshi", "moshi.utils", "moshi.modules", "moshi.models", "moshi.quantization"] + + +[project.optional-dependencies] +dev = [ + "pyright", + "flake8", + "pre-commit", +] diff --git a/moshi_mlx/setup.cfg b/moshi_mlx/setup.cfg old mode 100755 new mode 100644