Skip to content

Commit

Permalink
update autoformatting (Project-MONAI#54)
Browse files Browse the repository at this point in the history
* update autoformatting

Signed-off-by: Wenqi Li <[email protected]>

* update config

Signed-off-by: Wenqi Li <[email protected]>

* update config

Signed-off-by: Wenqi Li <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
wyli and pre-commit-ci[bot] authored May 23, 2022
1 parent a2c859a commit 2d16405
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 26 deletions.
48 changes: 34 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,51 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-toml
- id: check-case-conflict
- id: check-added-large-files
args: ['--maxkb=1024']
- id: detect-private-key
- id: forbid-new-submodules
- id: pretty-format-json
args: ['--autofix', '--no-sort-keys', '--indent=4']
- id: end-of-file-fixer
- id: mixed-line-ending

#- repo: https://github.com/asottile/pyupgrade
# rev: v2.23.2
# hooks:
# - id: pyupgrade
# args: [--py36-plus]
# name: Upgrade code
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.1
# hooks:
# - id: pyupgrade
# args: [--py36-plus]
# name: Upgrade code
# exclude: |
# (?x)^(
# versioneer.py|
# monai/_version.py
# )$

#- repo: https://github.com/asottile/yesqa
# rev: v1.2.3
# hooks:
# - id: yesqa
# name: Unused noqa
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa
name: Unused noqa
additional_dependencies:
- flake8>=3.8.1
- flake8-bugbear
- flake8-comprehensions
- flake8-executable
- flake8-pyi
- pep8-naming
exclude: |
(?x)^(
monai/__init__.py|
docs/source/conf.py
)$
#- repo: https://github.com/PyCQA/isort
# rev: 5.9.3
Expand Down
2 changes: 1 addition & 1 deletion DiNTS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ To further fuse the output segmetnation masks, user needs to create a `.json` fi
pages={4126--4135},
year={2020}
}
```
```
2 changes: 1 addition & 1 deletion DiNTS/run_ensemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ python -m torch.distributed.launch --nproc_per_node=${NUM_GPUS_PER_NODE} \
"${FOLDER_0}/Seg_Fold1_test" \
"${FOLDER_0}/Seg_Fold2_test" \
"${FOLDER_0}/Seg_Fold3_test" \
"${FOLDER_0}/Seg_Fold4_test" \
"${FOLDER_0}/Seg_Fold4_test" \
2 changes: 1 addition & 1 deletion DiNTS/run_infer_multi-gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ do
--output_root=${OUTPUT_ROOT} \
--prob \
--root=${DATA_ROOT}
done
done
2 changes: 1 addition & 1 deletion DiNTS/run_install_monai.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pip uninstall --yes monai
pip install git+https://github.com/Project-MONAI/MONAI#egg=monai

pip uninstall --yes tqdm
pip install tqdm
pip install tqdm
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

**Contribution Guidelines:**

1. Contributions are required to be published and have successfully undergone peer-review (If the contributing person is not the author of the work, no approval from the authors of the paper is required, but the contribution needs to be clearly labeled as a “Third-party contribution”).
1. Contributions are required to be published and have successfully undergone peer-review (If the contributing person is not the author of the work, no approval from the authors of the paper is required, but the contribution needs to be clearly labeled as a “Third-party contribution”).

2. The implementation is required to feature MONAI components to a substantial extent.

2. The implementation is required to feature MONAI components to a substantial extent.

3. The implementation is required to include a boilerplate shell script (to be published) allowing code-reviewers to execute the code and reproduce the paper’s results with one click.

4. Under the hood, code quality does not have to match standards of the MONAI main repository, as the Research Contribution repository aims at a fast track for code change proposals and demonstrating cutting-edge research ideas.
4. Under the hood, code quality does not have to match standards of the MONAI main repository, as the Research Contribution repository aims at a fast track for code change proposals and demonstrating cutting-edge research ideas.

5. New contributions will be given a MONAI version tag (visible in the associated Readme) according to the utilized version of MONAI. This avoids the need to maintain compatibility of contributions for following MONAI releases.
2 changes: 0 additions & 2 deletions SkullRec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,3 @@ and,
publisher={Springer}
}
```


1 change: 0 additions & 1 deletion SwinUNETR/BRATS21/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ A swin transformer-based model for volumetric (3D) brain tumor segmentation task

# References
[1] Hatamizadeh, Ali, et al. "Swin UNETR: Shifted Window Transformers for 3D Semantic Segmentation of Brain Tumors.", 2021.

2 changes: 1 addition & 1 deletion lamp-automated-model-parallelism/unet_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class Stash(nn.Module):
def forward(self, input: torch.Tensor):
yield stash("skip", input)
return input # noqa using yield together with return
return input # using yield together with return


@skippable(stash=[], pop=["skip"])
Expand Down

0 comments on commit 2d16405

Please sign in to comment.