-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI [2/N] #29
Merged
CI [2/N] #29
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
46dea3a
adding ci and community stuff
adefossez c1796e5
plop
adefossez ca4853a
dbg
adefossez 9020f11
plop
adefossez 3fb2332
plop
adefossez 87300f4
plop
adefossez 933ee1b
adding precommit
adefossez 21c296a
plop
adefossez 24566e9
test
adefossez c7c4366
plopg
adefossez a2e3204
test
adefossez a9ca156
plop
adefossez 278ef00
plop
adefossez 5ddcae1
plop
adefossez ef8c5fe
more ci
adefossez 966377f
plop
adefossez cf2d030
lint on mlx
adefossez 23e66e9
fix
adefossez cec3bd6
trying to speedup rust ci
adefossez f624eae
minor fixes
adefossez 86806c5
Merge branch 'refacto' into ci
adefossez 65c8b91
plop
adefossez c8b34f2
Merge branch 'refacto' into ci
adefossez e81e334
Merge branch 'ci' into testing
adefossez 4f7f3a7
license
adefossez cd362cc
making local and local_web resilient to running from root repo
adefossez ea5228c
fix
adefossez 95c5bac
Merge pull request #30 from kyutai-labs/testing
LaurentMazare 85bcac8
Merge branch 'refacto' into ci
adefossez 59e732c
Merge branch 'rename' into ci
adefossez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: 🐛 Bug Report | ||
about: Submit a bug report to help us improve | ||
labels: bug, triage | ||
--- | ||
|
||
## 🐛 Bug Report | ||
|
||
<!-- A clear and concise description of what the bug is --> | ||
|
||
## To Reproduce | ||
|
||
<!-- How to reproduce the bug --> | ||
|
||
## Your Environment | ||
|
||
<!-- Include as many relevant details about the environment you experienced the bug in.--> | ||
|
||
**Please fill this part, failure to do so will lead to your issue being directly closed.** | ||
|
||
- Backend impacted (PyTorch, MLX, Rust, or Other): | ||
- Operating system (OSX, Windows, Linux): | ||
- Operating system version: | ||
|
||
If the backend impacted is PyTorch: | ||
- Python version: | ||
- PyTorch version: | ||
- CUDA version (run `python -c 'import torch; print(torch.version.cuda)'`): | ||
- GPU model and memory: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
<!-- (Please ask your question here.) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 torch==2.4.0 --index-url https://download.pytorch.org/whl/cpu | ||
pip install -e './moshi[dev]' | ||
- name: Setup env | ||
shell: bash | ||
run: | | ||
. env/bin/activate | ||
pre-commit install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: rust_build | ||
description: 'Setup rust env' | ||
inputs: | ||
os: | ||
default: ubuntu-latest | ||
toolchain: | ||
default: stable | ||
target: | ||
default: check | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ inputs.toolchain }} | ||
override: true | ||
- name: cargo cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
rust/target/ | ||
key: ${{ inputs.os }}-cargo-${{ inputs.target }}-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ inputs.os }}-cargo- | ||
- name: install deps | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libasound2-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: precommit | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, refacto ] | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, refacto ] | ||
|
||
name: Rust CI | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
defaults: | ||
run: | ||
working-directory: ./rust | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust: [stable] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/rust_build | ||
- name: check | ||
shell: bash | ||
run: | | ||
cargo check | ||
- name: clippy | ||
shell: bash | ||
run: | | ||
cargo clippy -- -D warnings | ||
- name: fmt | ||
shell: bash | ||
run: | | ||
cargo fmt --all -- --check | ||
test: | ||
name: Test | ||
defaults: | ||
run: | ||
working-directory: ./rust | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust: [stable] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/rust_build | ||
with: | ||
target: test | ||
- name: test | ||
shell: bash | ||
run: | | ||
cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: flake8-moshi | ||
name: flake8 on moshi package | ||
language: system | ||
entry: bash -c 'cd moshi && flake8' | ||
pass_filenames: false | ||
- id: pyright-moshi | ||
name: pyright on moshi package | ||
language: system | ||
entry: bash -c 'cd moshi && pyright' | ||
pass_filenames: false | ||
- id: flake8-moshi_mlx | ||
name: flake8 on moshi_mlx package | ||
language: system | ||
entry: bash -c 'cd moshi_mlx && flake8' | ||
pass_filenames: false | ||
- id: pyright-moshi_mlx | ||
name: pyright on moshi_mlx package | ||
language: system | ||
entry: bash -c 'cd moshi_mlx && pyright' | ||
pass_filenames: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Permission is hereby granted, free of charge, to any | ||
person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the | ||
Software without restriction, including without | ||
limitation the rights to use, copy, modify, merge, | ||
publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software | ||
is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice | ||
shall be included in all copies or substantial portions | ||
of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF | ||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED | ||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | ||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR | ||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Permission is hereby granted, free of charge, to any | ||
person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the | ||
Software without restriction, including without | ||
limitation the rights to use, copy, modify, merge, | ||
publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software | ||
is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice | ||
shall be included in all copies or substantial portions | ||
of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF | ||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED | ||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | ||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR | ||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Copyright (c) Kyutai, all rights reserved. | ||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# flake8: noqa | ||
|
||
""" | ||
moshi_mlx is the MLX inference codebase for Kyutai audio generation models. | ||
""" | ||
|
||
# flake8: noqa | ||
from . import modules, models, utils | ||
|
||
__version__ = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will test once this is merged, for now I cannot see how this renders.