Skip to content

Commit

Permalink
Add LICENSE requirement in spec (#7014)
Browse files Browse the repository at this point in the history
Fixes #6964.

### Description
Add LICENSE requirement in specification.

https://github.com/Project-MONAI/model-zoo/blob/bdd183ebc113a70d50db4e4fb2ebd9a7c8c7532b/ci/verify_bundle.py#L28

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu authored Sep 25, 2023
1 parent 3bea5cf commit cc3faa3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/source/mb_specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ This specification defines the directory structure a bundle must have and the ne
Directory Structure
===================

A MONAI Bundle is defined primarily as a directory with a set of specifically named subdirectories containing the model and metadata files. The root directory should be named for the model, given as "ModelName" in this example, and should contain the following structure:
A MONAI Bundle is defined primarily as a directory with a set of specifically named subdirectories containing the model, metadata files and license. The root directory should be named for the model, given as "ModelName" in this example, and should contain the following structure:

::

ModelName
┣━ LICENSE
┣━ configs
┃ ┗━ metadata.json
┣━ models
Expand All @@ -31,6 +32,7 @@ A MONAI Bundle is defined primarily as a directory with a set of specifically na

The following files are **required** to be present with the given filenames for the directory to define a valid bundle:

* **LICENSE**: a license for the software itself comprising the configuration files and model weights.
* **metadata.json**: metadata information in JSON format relating to the type of model, definition of input and output tensors, versions of the model and used software, and other information described below.
* **model.pt**: the state dictionary of a saved model, the information to instantiate the model must be found in the metadata file.

Expand All @@ -39,7 +41,7 @@ The following files are optional but must have these names in the directory give
* **model.ts**: the Torchscript saved model if the model is compatible with being saved correctly in this format.
* **model.onnx**: the ONNX model if the model is compatible with being saved correctly in this format.
* **README.md**: plain-language information on the model, how to use it, author information, etc. in Markdown format.
* **license.txt**: software license attached to the model, can be left blank if no license needed.
* **license.txt**: software license attached to the data, can be left blank if no license needed.

Other files can be included in any of the above directories. For example, `configs` can contain further configuration JSON or YAML files to define scripts for training or inference, overriding configuration values, environment definitions such as network instantiations, and so forth. One common file to include is `inference.json` which is used to define a basic inference script which uses input files with the stored network to produce prediction output files.

Expand Down

0 comments on commit cc3faa3

Please sign in to comment.