Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
STYLE: Ensure line breaks at the end of all files (#717)
Browse files Browse the repository at this point in the history
* Add line breaks at the end of all files

* Handle last line in VS Code settings
  • Loading branch information
fepegar committed Apr 4, 2022
1 parent 2edbdc8 commit 6aab3b1
Show file tree
Hide file tree
Showing 51 changed files with 47 additions and 51 deletions.
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ jobs:

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

2 changes: 1 addition & 1 deletion .idea/InnerEye-DeepLearning.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/copyright/MIT_license.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/other.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Template__Cross_Validation.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Template__Run_ML_on_AzureML.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/pytest_all_simple_tests.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true
}
2 changes: 1 addition & 1 deletion GeoPol.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
<ExcludeFolder>GeoPol.xml</ExcludeFolder>
<ExcludeFolder>*.nii.gz</ExcludeFolder>
</Component>
</GeoPol_Folders>
</GeoPol_Folders>
2 changes: 1 addition & 1 deletion InnerEye-DataQuality/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The InnerEye-DataQuality code has been moved here: [https://github.com/microsoft/InnerEye-DeepLearning/tree/1606729c7a16e1bfeb269694314212b6e2737939/InnerEye-DataQuality](https://github.com/microsoft/InnerEye-DeepLearning/tree/1606729c7a16e1bfeb269694314212b6e2737939/InnerEye-DataQuality)
The InnerEye-DataQuality code has been moved here: [https://github.com/microsoft/InnerEye-DeepLearning/tree/1606729c7a16e1bfeb269694314212b6e2737939/InnerEye-DataQuality](https://github.com/microsoft/InnerEye-DeepLearning/tree/1606729c7a16e1bfeb269694314212b6e2737939/InnerEye-DataQuality)
1 change: 0 additions & 1 deletion InnerEye/ML/configs/classification/DummyClassification.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ def create_model(self) -> Any:
# Use a local import so that we don't need to import pytorch when creating configs in the runner
from Tests.ML.models.architectures.DummyScalarModel import DummyScalarModel
return DummyScalarModel(self.expected_image_size_zyx)

1 change: 0 additions & 1 deletion InnerEye/ML/models/architectures/classification/bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,3 @@ def forward(self, x: torch.Tensor) -> torch.Tensor: # type: ignore
x = self.conv_stack(x)
x = self.linear(x)
return x

2 changes: 1 addition & 1 deletion InnerEye/ML/reports/classification_crossval_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion InnerEye/ML/reports/classification_multilabel_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion InnerEye/ML/reports/segmentation_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"model_name": "BasicModel2Epochs", "checkpoint_paths": ["checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.segmentation.BasicModel2Epochs"}
{"model_name": "BasicModel2Epochs", "checkpoint_paths": ["checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.segmentation.BasicModel2Epochs"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
There were not enough data points for any statistically meaningful comparisons.
There were not enough data points for any statistically meaningful comparisons.
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,4 @@ epoch,subject,prediction_target,model_output,label,data_split,cross_validation_s
1,003469-OD,Default,0.482178,0,Train,0
1,001578-OS,Default,0.487305,1,Train,0
1,003327-OD,Default,0.477539,1,Train,0
1,002457-OS,Default,0.466064,0,Train,0
1,002457-OS,Default,0.466064,0,Train,0
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,4 @@ epoch,subject,prediction_target,model_output,label,data_split,cross_validation_s
1,003423-OS,Default,0.330811,1,Val,0
1,003476-OD,Default,0.313477,1,Val,0
1,003505-OS,Default,0.322266,1,Val,0
1,003516-OD,Default,0.295898,1,Val,0
1,003516-OD,Default,0.295898,1,Val,0
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,4 @@ epoch,subject,prediction_target,model_output,label,data_split,cross_validation_s
1,001436-OD,Default,0.553223,1,Train,1
1,001255-OS,Default,0.553223,1,Train,1
1,003059-OS,Default,0.539062,1,Train,1
1,002407-OD,Default,0.532715,0,Train,1
1,002407-OD,Default,0.532715,0,Train,1
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,4 @@ epoch,subject,prediction_target,model_output,label,data_split,cross_validation_s
1,003423-OD,Default,0.422363,1,Val,1
1,003476-OS,Default,0.388184,1,Val,1
1,003485-OS,Default,0.418945,1,Val,1
1,003502-OS,Default,0.399170,1,Val,1
1,003502-OS,Default,0.399170,1,Val,1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"model_name": "GlaucomaPublic", "checkpoint_paths": ["checkpoints/OTHER_RUNS/1/last.ckpt", "checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.classification.GlaucomaPublic"}
{"model_name": "GlaucomaPublic", "checkpoint_paths": ["checkpoints/OTHER_RUNS/1/last.ckpt", "checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.classification.GlaucomaPublic"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"model_name": "HelloContainer", "checkpoint_paths": ["checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.other.HelloContainer"}
{"model_name": "HelloContainer", "checkpoint_paths": ["checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.other.HelloContainer"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.012701375409960747
0.012701375409960747
Original file line number Diff line number Diff line change
@@ -1 +1 @@
There were not enough data points for any statistically meaningful comparisons.
There were not enough data points for any statistically meaningful comparisons.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
There were not enough data points for any statistically meaningful comparisons.
There were not enough data points for any statistically meaningful comparisons.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
There were not enough data points for any statistically meaningful comparisons.
There were not enough data points for any statistically meaningful comparisons.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ No outliers found

=== METRIC: HausdorffDistance_mm ===

No outliers found
No outliers found
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"model_name": "BasicModelForEnsembleTest", "checkpoint_paths": ["checkpoints/OTHER_RUNS/1/last.ckpt", "checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.segmentation.BasicModel2Epochs"}
{"model_name": "BasicModelForEnsembleTest", "checkpoint_paths": ["checkpoints/OTHER_RUNS/1/last.ckpt", "checkpoints/last.ckpt"], "model_configs_namespace": "InnerEye.ML.configs.segmentation.BasicModel2Epochs"}
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ We prefer all communications to be in English.

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
<!-- END MICROSOFT SECURITY.MD BLOCK -->
2 changes: 1 addition & 1 deletion Tests/ML/test_data/Val_outliers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ Patient Structure seriesId
prostate 6fa04f324339c532a7c06877d1129bfacd7504d9c0bf6277a393915e73e41d66 5a6ba8fe-65bc-43ec-b1fc-682c8c37e40c 1.0 0.0 0.0 0.0
seminalvesicles 6fa04f324339c532a7c06877d1129bfacd7504d9c0bf6277a393915e73e41d66 5a6ba8fe-65bc-43ec-b1fc-682c8c37e40c 1.0 0.0 0.0 0.0

SELECT * FROM ROOT as r WHERE true AND (r.InstitutionId = "641eda02-90c3-45ed-b8b1-2651b6a5da6c" OR r.InstitutionId = "5a6ba8fe-65bc-43ec-b1fc-682c8c37e40c") AND (STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"9e84c7f5b030cc48e867430e762e1bb7e756051e27468b4fa6a0472292bb59eb") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"4af0d32eb2c7b4d253b98530b8c6f5aac10602d51ff4097ab3c932331cf0d2a5") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"d41cb61517793f87f97d5d6c0cee9f91df94169c29701c10190723ff8ede419a") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"5f1573dbbf6a8335bcf8bf5eed74e9157d4e7ee9dae8d679d4d4d7118510d741") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"991648f92b04f05e316fe7c99b1aa748c2d556b1e873591ae9b9bbd2c319254a") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"1deef6a1145f76617016a3e26288b009028e411ae4a236043afe7aa8cfbff6b4") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"f040ac05a1eeee9a064662adda21f703d7ba969b7dfc2787248b2c596ccf59a7") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"4b6610b5b249fbc149eb0a47abe97d08df6b26b76ffcf59431271d057f722d14") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"776d594c55725ad79bf59df2e3e9b6e6ded64cd37a1df45b03847c1e54828246") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"6fa04f324339c532a7c06877d1129bfacd7504d9c0bf6277a393915e73e41d66"))
SELECT * FROM ROOT as r WHERE true AND (r.InstitutionId = "641eda02-90c3-45ed-b8b1-2651b6a5da6c" OR r.InstitutionId = "5a6ba8fe-65bc-43ec-b1fc-682c8c37e40c") AND (STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"9e84c7f5b030cc48e867430e762e1bb7e756051e27468b4fa6a0472292bb59eb") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"4af0d32eb2c7b4d253b98530b8c6f5aac10602d51ff4097ab3c932331cf0d2a5") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"d41cb61517793f87f97d5d6c0cee9f91df94169c29701c10190723ff8ede419a") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"5f1573dbbf6a8335bcf8bf5eed74e9157d4e7ee9dae8d679d4d4d7118510d741") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"991648f92b04f05e316fe7c99b1aa748c2d556b1e873591ae9b9bbd2c319254a") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"1deef6a1145f76617016a3e26288b009028e411ae4a236043afe7aa8cfbff6b4") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"f040ac05a1eeee9a064662adda21f703d7ba969b7dfc2787248b2c596ccf59a7") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"4b6610b5b249fbc149eb0a47abe97d08df6b26b76ffcf59431271d057f722d14") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"776d594c55725ad79bf59df2e3e9b6e6ded64cd37a1df45b03847c1e54828246") OR STARTSWITH(r.VersionedDicomImageSeries.Latest.Series.InstanceUID,"6fa04f324339c532a7c06877d1129bfacd7504d9c0bf6277a393915e73e41d66"))
2 changes: 1 addition & 1 deletion Tests/ML/test_data/Val_outliers_pruned.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Patient Structure
411 bladder 1.0 0.0 0.0 0.0
femur_r 1.0 0.0 0.0 0.0
prostate 1.0 0.0 0.0 0.0
seminalvesicles 1.0 0.0 0.0 0.0
seminalvesicles 1.0 0.0 0.0 0.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ S1,green,1_green.png,
S2,blue,1_blue.png,2|3
S2,green,1_green.png,
S3,blue,1_blue.png,3
S3,green,1_green.png,
S3,green,1_green.png,
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
3250.00005,VST 7,25,Bar,category_1,category_B,233,0,0,84,img_8,5,0
3250.00005,VST 8,25,Bar,category_1,category_B,218,0,0,84,img_9,6,0
3250.00005,VST 9,25,Bar,category_1,category_B,221,0,0,84,img_10,7,0
3250.00005,VST 10,25,Bar,category_1,category_B,238,0,0.02,84,img_11,8,0
3250.00005,VST 10,25,Bar,category_1,category_B,238,0,0.02,84,img_11,8,0
1 change: 0 additions & 1 deletion Tests/ML/test_data/test_dataset_parameters.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
1,2,crop_sizes
[ 37 37 37],[ 37 37 37],"[55, 55, 55]"
[ 37 37 37],[ 37 37 37],"[55, 55, 55]"

1 change: 0 additions & 1 deletion Tests/ML/utils/test_temperature_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ def criterion_fn(_logits: torch.Tensor, _labels: torch.Tensor) -> Tuple[torch.Te
assert after_ece.item() < before_ece.item()
assert np.isclose(optimal_temperature, 1.44, rtol=0.1)
assert model.temperature.requires_grad is False

1 change: 0 additions & 1 deletion docs/bring_your_own_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,3 @@ class Container2(LightningContainer):
# These arguments will be passed through to the Lightning trainer.
return {"gradient_clip_val": 1, "limit_train_batches": 10}
```

2 changes: 1 addition & 1 deletion docs/move_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ workspace specified in the parameters.
The model is expected to be in the format above, i.e. contained in a subfolder called `name_version` of the path in `--path` parameter. The model will be automatically given the next available `id` once uploaded to the workspace. For example, if `my_model:100` already exists then it will be called `my_model:101`.

Once in place you may want to run inference on the model with partial test data, i.e. test data from patients for whom
some of the labels are missing. Normally inference on partial test data would raise an exception. To allow inference to continue over partial test data add the flag `--allow_incomplete_labels` to your inference call, for example `python InnerEye/ML/runner.py --allow_incomplete_labels --no-train --azureml --model=<model_name> --run_recovery_id=<recovery_id>`
some of the labels are missing. Normally inference on partial test data would raise an exception. To allow inference to continue over partial test data add the flag `--allow_incomplete_labels` to your inference call, for example `python InnerEye/ML/runner.py --allow_incomplete_labels --no-train --azureml --model=<model_name> --run_recovery_id=<recovery_id>`
2 changes: 1 addition & 1 deletion docs/self_supervised_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ or for a local run

```
python ML/runner.py --model=CXRImageClassifier --local_weights_path={LOCAL_PATH_TO_YOUR_SSL_CHECKPOINT}
```
```

0 comments on commit 6aab3b1

Please sign in to comment.