You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update readme and adjust the directory
* add file size requirements in template
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update readme according to reviews
* rename deepedit
* update model naming requirements
* add more naming examples
* Update README.md
update the contribute part
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
MONAI Model Zoo hosts a collection of medical imaging models in the [MONAI Bundle](https://docs.monai.io/en/latest/bundle_intro.html) format.
4
+
All source code of models (bundles) are tracked in `models/`, and for each distinct version of a bundle, it will be archived as a `.zip` file (named in the form of `bundle_name_version.zip`) and stored in `Releases`.
4
5
5
-
## Model Storage
6
-
Github limits the size of files allowed in the repository (see [About size limits on GitHub](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github)). Therefore, MONAI Model Zoo suggests to use Git Large File Storage (LFS) to store large files for any single file that is larger than **25MB**.
6
+
## Model naming
7
7
8
-
### Example of install Git LFS on Linux AMD64
9
-
There are multiple ways to install Git LFS. For example, you can download [a suitable binary package](https://github.com/git-lfs/git-lfs/releases) and run `./install.sh` inside the downloaded package.
8
+
The name of a bundle is suggested to contain its characteristics, such as include the task type and data type. The following are some of the examples:
10
9
11
-
Takes the Linux AMD64 environment for instance, the commands are like the following (until May 11th 2022, the latest release is v3.1.4. The following commands may need to update for later releases):
Please refer to the [official installing guide](https://github.com/git-lfs/git-lfs#installing) for more details.
18
16
19
-
### Example of push large files with Git LFS
17
+
##Model storage
20
18
21
-
Usually, we use `git add` to add files for a commit. For a large file, we need to track it first, then `.gitattributes` will automatically be changed, and also need to be added. The following steps are the same as usual. The total commands are like the following:
19
+
Github limits the size of files allowed in the repository (see [About size limits on GitHub](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github)). Therefore, MONAI Model Zoo limits each single file to be no larger than **25MB**.
20
+
21
+
### Prepare a config file for large files
22
+
23
+
If a bunlde has large files, please upload those files into a publicly accessible source, and provide a config file called `large_file.yml` (or `.yaml`, `.json`) that contains the corresponding download links. During the pull request, only the config file should be included (large files should be excluded). Please put the config file within the root directory of the bundle, and it should contain the following information:
24
+
25
+
1.`path`, relative path of the large file in the bundle.
26
+
2.`url`, URL link that can download the file.
27
+
3.`hash_val`, (**optional**) expected hash value of the file.
28
+
4.`hash_type`, (**optional**) hash type. Supprted hash type includes "md5", "sha1", "sha256" and "sha512".
29
+
30
+
The template is as follow:
22
31
```
23
-
git lfs track "example_large_model.pt"
24
-
git add .gitattributes
25
-
git add example_large_model.pt
26
-
git commit --signoff
27
-
...
32
+
large_files:
33
+
- path: "models/large-file-1.pt"
34
+
url: "url-of-large-file-1.pt"
35
+
hash_val: ""
36
+
hash_type: ""
37
+
- path: "models/large-file-2.ts"
38
+
url: "url-of-large-file-2.ts"
28
39
```
29
-
Please refer to the [official example usage](https://github.com/git-lfs/git-lfs#example-usage) for more details.
40
+
41
+
### Validate and release
42
+
43
+
As for a pull request, a CI program will try to download all large files if mentioned and do several validations. If the pull request is approved and merged, the full bundle (with all large files if exists) will be archived and send to [Releases](https://github.com/Project-MONAI/model-zoo/releases).
30
44
31
45
## Contributing
32
46
@@ -41,15 +55,14 @@ Please refer to [MONAI Bundle Specification](https://docs.monai.io/en/latest/mb_
41
55
All code changes to the dev branch must be done via [pull requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests).
42
56
1. Please create a new ticket from [the issue list][monai model zoo issue list].
43
57
1.[create a new branch in your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
44
-
of the codebase named `[ticket_id]-[task_name]`.
58
+
(**So far, as the internal used private repository, please create a new branch during this repository directly**) of the codebase named `[ticket_id]-[task_name]`.
45
59
Ideally, the new branch should be based on the latest `dev` branch.
46
60
1. Make changes to the branch ([use detailed commit messages if possible](https://chris.beams.io/posts/git-commit/)).
47
61
1.[Create a new pull request](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) from the task branch to the dev branch, with detailed descriptions of the purpose of this pull request.
48
-
1. For any large files inside the bundle, please use [Git LFS commands](https://github.com/git-lfs/git-lfs/edit/main/README.md#example-usage) to track them properly.
49
-
2. A pull request template is provided, and please address all related palces in the checklist.
50
-
3. Wait for reviews; if there are reviews, make point-to-point responses, make further code changes if needed.
51
-
4. If there are conflicts between the pull request branch and the dev branch, pull the changes from the dev and resolve the conflicts locally.
52
-
5. Reviewer and contributor may have discussions back and forth until all comments addressed.
53
-
6. Wait for the pull request to be merged.
62
+
1. For any large files inside the bundle, please exclude them and provide the download links instead. Please follow the instructions mentioned above to prepare the necessary `large_file.yml`.
63
+
1. Wait for reviews; if there are reviews, make point-to-point responses, make further code changes if needed.
64
+
1. If there are conflicts between the pull request branch and the dev branch, pull the changes from the dev and resolve the conflicts locally.
65
+
1. Reviewer and contributor may have discussions back and forth until all comments addressed.
66
+
1. Wait for the pull request to be merged.
54
67
55
68
[monai model zoo issue list]: https://github.com/Project-MONAI/model-zoo/issues
0 commit comments