Skip to content

Commit b535e62

Browse files
committed
Merge branch 'dev'
2 parents 131c9f7 + 6c1937d commit b535e62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+13282
-9931
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ clinicadl/notebooks/
3535
# Mask and other files
3636
clinicadl/clinicadl/resources/masks/*.nii
3737
clinicadl/clinicadl/resources/masks/*.nii.gz
38+

CHANGELOG

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Changelog
2+
3+
Main changes to this code/ project are documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
-
13+
-
14+
-
15+
16+
### Changed
17+
18+
-
19+
-
20+
21+
### Deprecated
22+
23+
### Removed
24+
25+
### Fixed
26+
27+
### Security
28+
29+
## ClinicaDL 0.2.0
30+
31+
### Added
32+
33+
- New functionality `clinica interpret` to generate saliency maps linked
34+
to pretrained models based on groups of individual images.
35+
- New functionality `clinicadl random-search` to sample random networks from a
36+
predefined hyperparameter space.
37+
- Slice subparsers for `autoencoder`/`cnn`/`multicnn` to be homogeneous with other
38+
parsers.
39+
- roi parser has now `multicnn` option.
40+
- Add generic options to command line: `--verbose`, `--version` and
41+
`--logname`.
42+
43+
### Changed
44+
45+
- Behaviour of `clinicadl quality-check t1-volume`.
46+
- Simplify `clinicadl tsvtools` behaviour when using getlabels, split and
47+
analysis.
48+
- Update documentation.
49+
50+
### Fixed
51+
52+
- Fix broken file when running preprocessing in t1-extensive.
53+
54+

Jenkinsfile

Lines changed: 143 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -157,41 +157,150 @@ pipeline {
157157
}
158158
}
159159
}
160-
}
161-
stage('Train tests Linux') {
162-
agent { label 'linux && gpu' }
163-
environment {
164-
PATH = "$HOME/miniconda3/bin:$HOME/miniconda/bin:$PATH"
165-
}
166-
steps {
167-
echo 'Testing train task...'
168-
sh 'echo "Agent name: ${NODE_NAME}"'
169-
//sh 'conda env remove --name "clinicadl_test"'
170-
sh '''#!/usr/bin/env bash
171-
set +x
172-
eval "$(conda shell.bash hook)"
173-
source ./.jenkins/scripts/find_env.sh
174-
conda activate clinicadl_test
175-
clinicadl --help
176-
cd $WORKSPACE/clinicadl/tests
177-
mkdir -p ./data/dataset
178-
tar xf /mnt/data/data_CI/dataset/RandomCaps.tar.gz -C ./data/dataset
179-
cp -r /mnt/data/data_CI/labels_list ./data/
180-
pytest \
181-
--junitxml=../../test-reports/test_train_report.xml \
182-
--verbose \
183-
--disable-warnings \
184-
-k "test_train"
185-
conda deactivate
186-
'''
187-
}
188-
post {
189-
always {
190-
junit 'test-reports/test_train_report.xml'
191-
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/dataset'
192-
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/labels_list'
160+
}
161+
stage('Train / transfer learning / interpretation / random search') {
162+
stages{
163+
stage('Train tests Linux') {
164+
agent { label 'linux && gpu' }
165+
environment {
166+
PATH = "$HOME/miniconda3/bin:$HOME/miniconda/bin:$PATH"
167+
}
168+
steps {
169+
echo 'Testing train task...'
170+
sh 'echo "Agent name: ${NODE_NAME}"'
171+
//sh 'conda env remove --name "clinicadl_test"'
172+
sh '''#!/usr/bin/env bash
173+
set +x
174+
eval "$(conda shell.bash hook)"
175+
source ./.jenkins/scripts/find_env.sh
176+
conda activate clinicadl_test
177+
clinicadl --help
178+
cd $WORKSPACE/clinicadl/tests
179+
mkdir -p ./data/dataset
180+
tar xf /mnt/data/data_CI/dataset/RandomCaps.tar.gz -C ./data/dataset
181+
cp -r /mnt/data/data_CI/labels_list ./data/
182+
pytest \
183+
--junitxml=../../test-reports/test_train_report.xml \
184+
--verbose \
185+
--disable-warnings \
186+
-k "test_train"
187+
conda deactivate
188+
'''
189+
}
190+
post {
191+
always {
192+
junit 'test-reports/test_train_report.xml'
193+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/dataset'
194+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/labels_list'
195+
}
196+
}
193197
}
194-
}
198+
stage('Transfer learning tests Linux') {
199+
agent { label 'linux && gpu' }
200+
environment {
201+
PATH = "$HOME/miniconda3/bin:$HOME/miniconda/bin:$PATH"
202+
}
203+
steps {
204+
echo 'Testing transfer learning...'
205+
sh 'echo "Agent name: ${NODE_NAME}"'
206+
//sh 'conda env remove --name "clinicadl_test"'
207+
sh '''#!/usr/bin/env bash
208+
set +x
209+
eval "$(conda shell.bash hook)"
210+
source ./.jenkins/scripts/find_env.sh
211+
conda activate clinicadl_test
212+
clinicadl --help
213+
cd $WORKSPACE/clinicadl/tests
214+
mkdir -p ./data/dataset
215+
tar xf /mnt/data/data_CI/dataset/RandomCaps.tar.gz -C ./data/dataset
216+
cp -r /mnt/data/data_CI/labels_list ./data/
217+
pytest \
218+
--junitxml=../../test-reports/test_transfer_learning_report.xml \
219+
--verbose \
220+
--disable-warnings \
221+
test_transfer_learning.py
222+
conda deactivate
223+
'''
224+
}
225+
post {
226+
always {
227+
junit 'test-reports/test_transfer_learning_report.xml'
228+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/dataset'
229+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/labels_list'
230+
}
231+
}
232+
}
233+
stage('Interpretation tests Linux') {
234+
agent { label 'linux && gpu' }
235+
environment {
236+
PATH = "$HOME/miniconda3/bin:$HOME/miniconda/bin:$PATH"
237+
}
238+
steps {
239+
echo 'Testing interpret task...'
240+
sh 'echo "Agent name: ${NODE_NAME}"'
241+
//sh 'conda env remove --name "clinicadl_test"'
242+
sh '''#!/usr/bin/env bash
243+
set +x
244+
eval "$(conda shell.bash hook)"
245+
source ./.jenkins/scripts/find_env.sh
246+
conda activate clinicadl_test
247+
clinicadl --help
248+
cd $WORKSPACE/clinicadl/tests
249+
mkdir -p ./data/dataset
250+
tar xf /mnt/data/data_CI/dataset/RandomCaps.tar.gz -C ./data/dataset
251+
cp -r /mnt/data/data_CI/labels_list ./data/
252+
pytest \
253+
--junitxml=../../test-reports/test_interpret_report.xml \
254+
--verbose \
255+
--disable-warnings \
256+
test_interpret.py
257+
conda deactivate
258+
'''
259+
}
260+
post {
261+
always {
262+
junit 'test-reports/test_interpret_report.xml'
263+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/dataset'
264+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/labels_list'
265+
}
266+
}
267+
}
268+
stage('Random search tests Linux') {
269+
agent { label 'linux && gpu' }
270+
environment {
271+
PATH = "$HOME/miniconda3/bin:$HOME/miniconda/bin:$PATH"
272+
}
273+
steps {
274+
echo 'Testing random search...'
275+
sh 'echo "Agent name: ${NODE_NAME}"'
276+
//sh 'conda env remove --name "clinicadl_test"'
277+
sh '''#!/usr/bin/env bash
278+
set +x
279+
eval "$(conda shell.bash hook)"
280+
source ./.jenkins/scripts/find_env.sh
281+
conda activate clinicadl_test
282+
clinicadl --help
283+
cd $WORKSPACE/clinicadl/tests
284+
mkdir -p ./data/dataset
285+
tar xf /mnt/data/data_CI/dataset/RandomCaps.tar.gz -C ./data/dataset
286+
cp -r /mnt/data/data_CI/labels_list ./data/
287+
pytest \
288+
--junitxml=../../test-reports/test_random_search_report.xml \
289+
--verbose \
290+
--disable-warnings \
291+
test_random_search.py
292+
conda deactivate
293+
'''
294+
}
295+
post {
296+
always {
297+
junit 'test-reports/test_random_search_report.xml'
298+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/dataset'
299+
sh 'rm -rf $WORKSPACE/clinicadl/tests/data/labels_list'
300+
}
301+
}
302+
}
303+
}
195304
}
196305
}
197306
}

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include clinicadl/clinicadl/preprocessing/t1_extensive/info.json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ can be performed:
8989
* **T1w-weighted MR image preprocessing.** The `preprocessing` task
9090
processes a dataset of T1 images stored in BIDS format and prepares to
9191
extract the tensors (see paper for details on the preprocessing). Output
92-
is stored using the [CAPS](http://www.clinica.run/doc/CAPS/Introduction/)
92+
is stored using the [CAPS](https://aramislab.paris.inria.fr/clinica/docs/public/latest/CAPS/Introduction/)
9393
hierarchy.
9494
* **Quality check of preprocessed data.** The `quality_check` task uses a
9595
pretrained network [(Fonov et al,
@@ -98,7 +98,7 @@ can be performed:
9898
* **Tensor extraction from preprocessed data.** The `extract` task allows
9999
to create files in PyTorch format (`.pt`) with different options: the
100100
complete MRI, 2D slices and/or 3D patches. This files are also stored in
101-
the [CAPS](http://www.clinica.run/doc/CAPS/Introduction/) hierarchy.
101+
the [CAPS](https://aramislab.paris.inria.fr/clinica/docs/public/latest/CAPS/Introduction/) hierarchy.
102102

103103
- **Train & test your classifier**
104104
* **Train neural networks.** The `train` task is designed to perform

clinicadl/clinicadl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.1
1+
0.2.0rc1

clinicadl/clinicadl/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
__all__ = ['__version__']
2+
3+
# Load the Clinica package version
4+
import sys
5+
import pkgutil
6+
__version__ = pkgutil.get_data(__package__, 'VERSION').decode('ascii').strip()
7+
version = __version__
8+
9+
# import pkg_resources
10+
# version = pkg_resources.require("Clinica")[0].version
11+
# __version__ = version
12+
13+
# python 3.6 minimum version is required
14+
if sys.version_info < (3, 6):
15+
print(f"ClinicaDL {__version__} requires Python 3.6")
16+
sys.exit(1)

0 commit comments

Comments
 (0)