Skip to content

Commit

Permalink
Merge pull request mlcommons#512 from sarthakpati/common_copyright_an…
Browse files Browse the repository at this point in the history
…d_updated_email

Implemented a common copyright message for CLI and updated links & email
  • Loading branch information
sarthakpati authored Oct 26, 2022
2 parents 5b1d760 + c9015e2 commit 5c22430
Show file tree
Hide file tree
Showing 26 changed files with 90 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/--questions-help-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---
<!-- By proceeding, you acknowledge that you have
taken a look at the FAQ section in the documentation:
https://cbica.github.io/GaNDLF/faq
https://mlcommons.github.io/GaNDLF/faq
-->

**GaNDLF Version**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:


# Below steps are for GitHub Packages integration, metadata and signing
# See https://github.com/CBICA/GaNDLF/new/master?filename=.github%2Fworkflows%2Fdocker-publish.yml&workflow_template=docker-publish
# See https://github.com/mlcommons/GaNDLF/new/master?filename=.github%2Fworkflows%2Fdocker-publish.yml&workflow_template=docker-publish

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at software@cbica.upenn.edu. All
reported by contacting the project team at [via email](mailto:gandlf@mlcommons.org). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
9 changes: 9 additions & 0 deletions GANDLF/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
from .patch_extraction import patch_extraction
from .main_run import main_run
from .preprocess_and_save import preprocess_and_save

from datetime import date

copyrightMessage = (
"Contact: gandlf@mlcommons.org\n\n"
+ "This program is NOT FDA/CE approved and NOT intended for clinical use.\nCopyright (c) "
+ str(date.today().year)
+ " MLCommons. All rights reserved.\n\nCitation: https://arxiv.org/abs/2103.01006"
)
2 changes: 1 addition & 1 deletion GANDLF/data/ImagesFromDataFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def ImagesFromDataFrame(
# Initializing the subject object using the dict
subject = torchio.Subject(subject_dict)
# https://github.com/fepegar/torchio/discussions/587#discussioncomment-928834
# this is causing memory usage to explode, see https://github.com/CBICA/GaNDLF/issues/128
# this is causing memory usage to explode, see https://github.com/mlcommons/GaNDLF/issues/128
if parameters["verbose"]:
print(
"Checking consistency of images in subject '"
Expand Down
2 changes: 1 addition & 1 deletion GANDLF/models/seg_modules/Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Description
Link to the paper (CBICA): https://arxiv.org/pdf/1907.02110.pdf.
Link to the paper: https://arxiv.org/pdf/1907.02110.pdf.

This folder contains the smaller modules that are integrated to form the larger Inc U Net arch.

Expand Down
6 changes: 3 additions & 3 deletions GANDLF/models/uinc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

class uinc(ModelBase):
"""
This is the implementation of the following paper: https://arxiv.org/abs/1907.02110
(from CBICA). Please look at the seg_module files (towards the end), to get a better sense of
This is the implementation of the following paper: https://arxiv.org/abs/1907.02110.
Please look at the seg_module files (towards the end), to get a better sense of
the Inception Module implemented. The res parameter is for the addition of the initial feature
map with the final feature map after performance of the convolution. For the decoding module,
not the initial input but the input after the first convolution is addded to the final output
not the initial input but the input after the first convolution is added to the final output
since the initial input and the final one do not have the same dimensions.
"""

Expand Down
2 changes: 1 addition & 1 deletion GANDLF/utils/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def checkPatchDivisibility(patch_size, number=16):
if np.count_nonzero(np.remainder(patch_size_to_check, number)) > 0:
return False

# adding check to address https://github.com/CBICA/GaNDLF/issues/53
# adding check to address https://github.com/mlcommons/GaNDLF/issues/53
# there is quite possibly a better way to do this
unique = np.unique(patch_size_to_check)
if (unique.shape[0] == 1) and (unique[0] <= number):
Expand Down
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.0.16-
## 0.0.16
- ImageNet pre-trained models for UNet with variable encoders is now available
- ACS/Soft conversion is available for ImageNet-pretrained UNet
- Updated links, copyright and email to MLCommons

## 0.0.15
- Updated `setup.py` for `python>=3.8`
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ currently being supported with security updates.

## Reporting a PUBLIC Vulnerability

Please report any vulnerabilities that can be publicly shared via [GitHub Issues](https://github.com/CBICA/GaNDLF/issues/new/choose).
Please report any vulnerabilities that can be publicly shared via [GitHub Issues](https://github.com/mlcommons/GaNDLF/issues/new/choose).

## Reporting a PRIVATE Vulnerability

Please report any vulnerabilities that cannot be publicly shared via [email](mailto:gandlf@cbica.upenn.edu).
Please report any vulnerabilities that cannot be publicly shared via [email](mailto:gandlf@mlcommons.org).
2 changes: 1 addition & 1 deletion docs/acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This file records the following pieces of information:

## People

- [All coders and developers of GaNDLF](https://github.com/CBICA/GaNDLF/graphs/contributors)
- [All coders and developers of GaNDLF](https://github.com/mlcommons/GaNDLF/graphs/contributors)

- Supervisors:
- [Aimilia Gastounioti](https://www.med.upenn.edu/cbica/sbia/aimiliag.html)
Expand Down
50 changes: 25 additions & 25 deletions docs/extending.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For any new feature, please ensure the corresponding option in the [sample configuration](https://github.com/CBICA/GaNDLF/blob/master/samples/sample_training.yaml) is added, so that others can review/use/extend it as needed.
For any new feature, please ensure the corresponding option in the [sample configuration](https://github.com/mlcommons/GaNDLF/blob/master/samples/sample_training.yaml) is added, so that others can review/use/extend it as needed.

## Table of Contents
- [Table of Contents](#table-of-contents)
Expand All @@ -20,7 +20,7 @@ Before starting to work on the code-level on GaNDLF, please get the environment
**NOTE**: Windows users, please ensure sure you have [Microsoft Visual C++ 14.0 or greater](http://visualstudio.microsoft.com/visual-cpp-build-tools) installed.

```bash
git clone https://github.com/CBICA/GaNDLF.git
git clone https://github.com/mlcommons/GaNDLF.git
cd GaNDLF
conda create -p ./venv python=3.6 -y
conda activate ./venv
Expand All @@ -34,76 +34,76 @@ pip install -e .

## Overall Architecture

- Command-line parsing: [gandlf_run](https://github.com/CBICA/GaNDLF/blob/master/gandlf_run)
- Parameters from [training configuration](https://github.com/CBICA/GaNDLF/blob/master/samples/config_all_options.yaml) get passed as a `dict` via [parameter parser](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/parseConfig.py)
- [Training Manager](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/training_manager.py):
- Command-line parsing: [gandlf_run](https://github.com/mlcommons/GaNDLF/blob/master/gandlf_run)
- Parameters from [training configuration](https://github.com/mlcommons/GaNDLF/blob/master/samples/config_all_options.yaml) get passed as a `dict` via [parameter parser](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/parseConfig.py)
- [Training Manager](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/training_manager.py):
- Handles k-fold training
- Main entry point from CLI
- [Training Function](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/compute/training_loop.py):
- [Training Function](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/compute/training_loop.py):
- Performs actual training
- [Inference Manager](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/inference_manager.py):
- [Inference Manager](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/inference_manager.py):
- Handles inference functionality
- Main entry point from CLI
- [Inference Function](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/compute/inference_loop.py):
- [Inference Function](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/compute/inference_loop.py):
- Performs actual inference

[Back To Top &uarr;](#table-of-contents)

## Dependency Management

To update/change/add a dependency in [setup](https://github.com/CBICA/GaNDLF/blob/master/setup.py), please ensure **at least** the following conditions are met:
To update/change/add a dependency in [setup](https://github.com/mlcommons/GaNDLF/blob/master/setup.py), please ensure **at least** the following conditions are met:

- The package is being [actively maintained](https://opensource.com/life/14/1/evaluate-sustainability-open-source-project).
- The new dependency is being testing against the **minimum python version** supported by GaNDLF (see the `python_requires` variable in [setup](https://github.com/CBICA/GaNDLF/blob/master/setup.py)).
- The new dependency is being testing against the **minimum python version** supported by GaNDLF (see the `python_requires` variable in [setup](https://github.com/mlcommons/GaNDLF/blob/master/setup.py)).
- It does not clash with any existing dependencies.

## Adding Models

- For details, please see [README for `GANDLF.models` submodule](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/models/Readme.md).
- For details, please see [README for `GANDLF.models` submodule](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/models/Readme.md).
- [Update Tests](#update-tests)

[Back To Top &uarr;](#table-of-contents)

## Adding Augmentation Transformations

- Update or add dependency in [setup](https://github.com/CBICA/GaNDLF/blob/master/setup.py), if appropriate.
- Add transformation to `global_augs_dict`, defined in [`GANDLF/data/augmentation/__init__.py`](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/data/augmentation/__init__.py)
- Ensure probability is used as input; probability is not used for any [preprocessing operations](https://github.com/CBICA/GaNDLF/tree/master/GANDLF/data/preprocessing)
- For details, please see [README for `GANDLF.data.augmentation` submodule](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/data/augmentation/README.md).
- Update or add dependency in [setup](https://github.com/mlcommons/GaNDLF/blob/master/setup.py), if appropriate.
- Add transformation to `global_augs_dict`, defined in [`GANDLF/data/augmentation/__init__.py`](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/data/augmentation/__init__.py)
- Ensure probability is used as input; probability is not used for any [preprocessing operations](https://github.com/mlcommons/GaNDLF/tree/master/GANDLF/data/preprocessing)
- For details, please see [README for `GANDLF.data.augmentation` submodule](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/data/augmentation/README.md).
- [Update Tests](#update-tests)

[Back To Top &uarr;](#table-of-contents)

## Adding Preprocessing functionality

- Update or add dependency in [setup](https://github.com/CBICA/GaNDLF/blob/master/setup.py), if appropriate; see section on [Dependency Management](#dependency-management) for details.
- All transforms should be defined by inheriting from `torchio.transforms.intensity_transform.IntensityTransform`. For example, please see the threshold/clip functionality in the [`GANDLF/data/preprocessing/threshold_and_clip.py`](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/data/preprocessing/threshold_and_clip.py) file.
- Update or add dependency in [setup](https://github.com/mlcommons/GaNDLF/blob/master/setup.py), if appropriate; see section on [Dependency Management](#dependency-management) for details.
- All transforms should be defined by inheriting from `torchio.transforms.intensity_transform.IntensityTransform`. For example, please see the threshold/clip functionality in the [`GANDLF/data/preprocessing/threshold_and_clip.py`](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/data/preprocessing/threshold_and_clip.py) file.
- Define each option in the configuration file under the correct key (again, see threshold/clip as examples)
- Add transformation to `global_preprocessing_dict`, defined in [`GANDLF/data/preprocessing/__init__.py`](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/data/preprocessing/__init__.py)
- For details, please see [README for `GANDLF.data.preprocessing` submodule](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/data/preprocessing/README.md).
- Add transformation to `global_preprocessing_dict`, defined in [`GANDLF/data/preprocessing/__init__.py`](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/data/preprocessing/__init__.py)
- For details, please see [README for `GANDLF.data.preprocessing` submodule](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/data/preprocessing/README.md).
- [Update Tests](#update-tests)

[Back To Top &uarr;](#table-of-contents)

## Adding Training Functionality

- Update [Training Function](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/compute/training_loop.py)
- Update [Training Manager](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/training_manager.py), if any training API has changed
- Update [Training Function](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/compute/training_loop.py)
- Update [Training Manager](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/training_manager.py), if any training API has changed
- [Update Tests](#update-tests)

[Back To Top &uarr;](#table-of-contents)

## Adding Inference Functionality

- Update [Inference Function](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/compute/inference_loop.py)
- Update [Inference Manager](https://github.com/CBICA/GaNDLF/blob/master/GANDLF/inference_manager.py), if any inference API has changed
- Update [Inference Function](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/compute/inference_loop.py)
- Update [Inference Manager](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/inference_manager.py), if any inference API has changed
- [Update Tests](#update-tests)

[Back To Top &uarr;](#table-of-contents)

## Update Tests

Once you have made changes to functionality, it is imperative that the unit tests be updated to cover the new code. Please see the [full testing suite](https://github.com/CBICA/GaNDLF/blob/master/testing/test_full.py) for details and examples.
Once you have made changes to functionality, it is imperative that the unit tests be updated to cover the new code. Please see the [full testing suite](https://github.com/mlcommons/GaNDLF/blob/master/testing/test_full.py) for details and examples.

[Back To Top &uarr;](#table-of-contents)

Expand All @@ -114,7 +114,7 @@ Once you have the virtual environment set up, tests can be run using the followi
pytest --device cuda # can be cuda or cpu, defaults to cpu
```

Any failures will be reported in the file [`${GaNDLF_HOME}/testing/failures.log`](https://github.com/CBICA/GaNDLF/blob/5030ff83a38947c1583b58a08598308886ee9a0a/testing/conftest.py#L25).
Any failures will be reported in the file [`${GaNDLF_HOME}/testing/failures.log`](https://github.com/mlcommons/GaNDLF/blob/5030ff83a38947c1583b58a08598308886ee9a0a/testing/conftest.py#L25).

[Back To Top &uarr;](#table-of-contents)

Expand Down
14 changes: 7 additions & 7 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ This page contains answers to frequently asked questions about GaNDLF.

### Why do I get the error `pkg_resources.DistributionNotFound: The 'GANDLF' distribution was not found`?

This means that GaNDLF was not installed correctly. Please ensure you have followed the [installation guide](https://cbica.github.io/GaNDLF/setup) properly.
This means that GaNDLF was not installed correctly. Please ensure you have followed the [installation guide](https://mlcommons.github.io/GaNDLF/setup) properly.

[Back To Top &uarr;](#table-of-contents)

### Where do I start?

The [usage](https://cbica.github.io/GaNDLF/usage) guide is fairly comprehensive and provides a good starting point. If you have any questions, please feel free to [post a support request](https://github.com/CBICA/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=), and we will do our best to address it ASAP.
The [usage](https://mlcommons.github.io/GaNDLF/usage) guide is fairly comprehensive and provides a good starting point. If you have any questions, please feel free to [post a support request](https://github.com/mlcommons/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=), and we will do our best to address it ASAP.

[Back To Top &uarr;](#table-of-contents)

### Why is GaNDLF not working?

Verify that [the installation](https://cbica.github.io/GaNDLF/setup) has been done correctly by running `python ./gandlf_verifyInstall` after activating the correct virtual environment. If you are still having issues, please feel free to [post a support request](https://github.com/CBICA/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=), and we will do our best to address it ASAP.
Verify that [the installation](https://mlcommons.github.io/GaNDLF/setup) has been done correctly by running `python ./gandlf_verifyInstall` after activating the correct virtual environment. If you are still having issues, please feel free to [post a support request](https://github.com/mlcommons/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=), and we will do our best to address it ASAP.

[Back To Top &uarr;](#table-of-contents)

### Which parts of a GaNDLF configuration are customizable?

Virtually all of it! For more details, please see the [usage](https://cbica.github.io/GaNDLF/usage) guide and our extensive [samples](https://github.com/CBICA/GaNDLF/tree/master/samples). All available options are documented in the [config_all_options.yaml file](https://github.com/CBICA/GaNDLF/blob/master/samples/config_all_options.yaml).
Virtually all of it! For more details, please see the [usage](https://mlcommons.github.io/GaNDLF/usage) guide and our extensive [samples](https://github.com/mlcommons/GaNDLF/tree/master/samples). All available options are documented in the [config_all_options.yaml file](https://github.com/mlcommons/GaNDLF/blob/master/samples/config_all_options.yaml).

[Back To Top &uarr;](#table-of-contents)

### Can I run GaNDLF on a high performance computing (HPC) cluster?

YES, we have run GaNDLF on an SGE cluster to great success. Please [post a question](https://github.com/CBICA/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=) with more details such as the type of scheduler, and so on, and we will do our best to address it.
YES, we have run GaNDLF on an SGE cluster to great success. Please [post a question](https://github.com/mlcommons/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=) with more details such as the type of scheduler, and so on, and we will do our best to address it.

[Back To Top &uarr;](#table-of-contents)

Expand All @@ -56,12 +56,12 @@ GaNDLF allows you to resume training from a previous checkpoint in 2 ways:

### How can I update GaNDLF?

If you have performed `git clone` [during installation](https://cbica.github.io/GaNDLF/setup), then you will need to do `git pull` to get the latest master of GaNDLF. Follow this up with `pip install -e .` after activating the appropriate virtual environment to ensure the updates get passed through.
If you have performed `git clone` [during installation](https://mlcommons.github.io/GaNDLF/setup), then you will need to do `git pull` to get the latest master of GaNDLF. Follow this up with `pip install -e .` after activating the appropriate virtual environment to ensure the updates get passed through.

[Back To Top &uarr;](#table-of-contents)

### What I have another question?

Please [post a support request](https://github.com/CBICA/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=).
Please [post a support request](https://github.com/mlcommons/GaNDLF/issues/new?assignees=&labels=&template=--questions-help-support.md&title=).

[Back To Top &uarr;](#table-of-contents)
Loading

0 comments on commit 5c22430

Please sign in to comment.