forked from coqui-ai/Trainer
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from idiap/weights-only
fix(io): only enable load with weights_only in pytorch>=2.4
- Loading branch information
Showing
15 changed files
with
115 additions
and
191 deletions.
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
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
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,3 +1,5 @@ | ||
uv.lock | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
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,20 +1,13 @@ | ||
repos: | ||
- repo: "https://github.com/pre-commit/pre-commit-hooks" | ||
rev: v4.6.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.10 | ||
rev: v0.6.9 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format | ||
- repo: local | ||
hooks: | ||
- id: generate_requirements.py | ||
name: generate_requirements.py | ||
language: system | ||
entry: python bin/generate_requirements.py | ||
files: "pyproject.toml|requirements.*\\.txt|tools/generate_requirements.py" |
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 |
---|---|---|
|
@@ -29,28 +29,36 @@ If you have a new feature or a bug to squash, go ahead and send a ✨**PR**✨. | |
Please use the following steps for a ✨**PR**✨. | ||
Let us know if you encounter a problem along the way. | ||
|
||
The following steps are tested on an Ubuntu system. | ||
The following steps are tested on an Ubuntu system and require | ||
[uv](https://docs.astral.sh/uv/) for virtual environment management. Choose your | ||
preferred [installation | ||
method](https://docs.astral.sh/uv/getting-started/installation/), e.g. the | ||
standalone installer: | ||
|
||
```bash | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
``` | ||
|
||
1. Fork 👟[https://github.com/idiap/coqui-ai-Trainer] by clicking the fork button at the top right corner of the project page. | ||
|
||
2. Clone 👟 and add the main repo as a new remote named ```upsteam```. | ||
|
||
```bash | ||
$ git clone [email protected]:<your Github name>/coqui-ai-Trainer.git | ||
$ cd coqui-ai-Trainer | ||
$ git remote add upstream https://github.com/idiap/coqui-ai-Trainer.git | ||
git clone [email protected]:<your Github name>/coqui-ai-Trainer.git | ||
cd coqui-ai-Trainer | ||
git remote add upstream https://github.com/idiap/coqui-ai-Trainer.git | ||
``` | ||
|
||
3. Install 👟 for development. | ||
|
||
```bash | ||
$ make install | ||
make install | ||
``` | ||
|
||
4. Create a new branch with an informative name for your goal. | ||
|
||
```bash | ||
$ git checkout -b an_informative_name_for_my_branch | ||
git checkout -b an_informative_name_for_my_branch | ||
``` | ||
|
||
5. Implement your changes on your new branch. | ||
|
@@ -62,42 +70,45 @@ The following steps are tested on an Ubuntu system. | |
8. Run the tests to see how your updates work with the rest of the project. You can repeat this step multiple times as you implement your changes to make sure you are on the right direction. | ||
|
||
```bash | ||
$ make test # stop at the first error | ||
$ make test_all # run all the tests, report all the errors | ||
make test # stop at the first error | ||
make test_all # run all the tests, report all the errors | ||
``` | ||
|
||
9. Format your code. We use ```ruff``` for code formatting. | ||
|
||
```bash | ||
$ make style | ||
make style | ||
``` | ||
|
||
10. Run the linter and correct the issues raised. We use ```ruff``` for linting. It helps to enforce a coding standard, offers simple refactoring suggestions. | ||
10. Run the linter and correct the issues raised. We use ```ruff``` for linting. | ||
It helps to enforce a coding standard, offers simple refactoring | ||
suggestions. The formatter and linter are also run automatically via | ||
pre-commit. | ||
|
||
```bash | ||
$ make lint | ||
make lint | ||
``` | ||
|
||
11. When things are good, add new files and commit your changes. | ||
|
||
```bash | ||
$ git add my_file1.py my_file2.py ... | ||
$ git commit | ||
git add my_file1.py my_file2.py ... | ||
git commit | ||
``` | ||
|
||
It's a good practice to regularly sync your local copy of the project with the upstream code to keep up with the recent updates. | ||
```bash | ||
$ git fetch upstream | ||
$ git rebase upstream/main | ||
git fetch upstream | ||
git rebase upstream/main | ||
``` | ||
12. Send a PR to ```main``` branch. | ||
Push your branch to your fork. | ||
```bash | ||
$ git push -u origin an_informative_name_for_my_branch | ||
git push -u origin an_informative_name_for_my_branch | ||
``` | ||
Then go to your fork's Github page and click on 'Pull request' to send your ✨**PR**✨. | ||
|
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
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.