Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Data Preparation logic for manual steps #486

Merged
merged 247 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
28f7e7f
Add Data Preparator cookiecutter template
aristizabal95 Mar 3, 2023
6f9e19e
Rename cookiecutter folder
aristizabal95 Mar 3, 2023
df6e6a2
Temporarily remove possibly offending files
aristizabal95 Mar 3, 2023
a7db0cf
Remove cookicutter conditionals
aristizabal95 Mar 3, 2023
a7a6d15
Inclube back missing pieces of template
aristizabal95 Mar 3, 2023
e2f7108
remove cookiecutter typo
aristizabal95 Mar 3, 2023
581b5bb
Use project_name attribute
aristizabal95 Mar 3, 2023
fd77804
Change cookiecutter fields order
aristizabal95 Mar 3, 2023
6eebd59
Create empty directories on hook
aristizabal95 Mar 3, 2023
5ef86a2
Fix empty folders paths
aristizabal95 Mar 3, 2023
d04baf8
Create evaluator mlcube cookiecutter template
aristizabal95 Mar 6, 2023
02cec01
Fix JSON Syntax Error
aristizabal95 Mar 6, 2023
b3d7a1d
Update template default values
aristizabal95 Mar 6, 2023
7338236
Remove reference to undefined template variable
aristizabal95 Mar 6, 2023
d1cec5e
Implement model mlcube cookiecutter template
aristizabal95 Mar 6, 2023
7338755
Update cookiecutter variable default values
aristizabal95 Mar 6, 2023
3ae9226
Create medperf CLI command for creating MLCubes
aristizabal95 Mar 6, 2023
e07cde2
Provide additional options for mlcube create
aristizabal95 Mar 6, 2023
68e136a
Start working on tests
aristizabal95 Mar 7, 2023
b8e03ac
Add tests for cube create
aristizabal95 Mar 7, 2023
7896b25
Ignore invalid syntax on cookiecutter conditionals
aristizabal95 Mar 7, 2023
4f78981
Ignore more flake8 errors
aristizabal95 Mar 7, 2023
f5dab5e
Remove unused import
aristizabal95 Mar 7, 2023
a03d7f6
Empty commit for cloudbuild
aristizabal95 Mar 8, 2023
6bb60d0
Fix inconsistency with labels paths
aristizabal95 Mar 8, 2023
43b6cab
Update mlcube.yaml so it can be commented on docs
aristizabal95 Mar 8, 2023
55b5d22
Don't render noqa comments on template
aristizabal95 Mar 8, 2023
135c598
Remove flake8 specific ignores
aristizabal95 Mar 8, 2023
e9e2c32
Exclude templates from lint checks
aristizabal95 Mar 8, 2023
e95dab8
Remove specific flake8 ignores
aristizabal95 Mar 8, 2023
d059b7a
Fix labels_paht being passed in he wrong situation
aristizabal95 Mar 10, 2023
fcdaa7b
Add requirements to cookiecutters
aristizabal95 Mar 13, 2023
37f3f3c
Set separate labels as true by default
aristizabal95 Mar 14, 2023
b45fdb9
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Mar 22, 2023
fbf02b4
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Mar 31, 2023
7a33c23
Remove duplicate templates
aristizabal95 Mar 31, 2023
e9a1190
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 5, 2023
f2ff354
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 12, 2023
a682021
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 19, 2023
50592ee
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 21, 2023
31c6bbf
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 21, 2023
69ae2ed
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 Apr 26, 2023
8a47ad9
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 May 8, 2023
5f32e50
Abstract field-error dict formatting
aristizabal95 May 16, 2023
3951af8
Reformat errors dictionary for printing
aristizabal95 May 16, 2023
09b8d69
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 May 16, 2023
e7a8ae4
Merge branch 'main' of https://github.com/mlcommons/medperf
aristizabal95 May 23, 2023
e21a466
Implement manual-steps mlcube example
aristizabal95 Jun 3, 2023
01e75cb
Add medperf logic to handle manual data-preps
aristizabal95 Jun 7, 2023
80d00cb
Update mlcube implementation
aristizabal95 Jun 7, 2023
37415cf
Don't modify input paths. Fix visual issues
aristizabal95 Jun 12, 2023
69a4b89
Fix labels bug. Use yaml for reports
aristizabal95 Jun 12, 2023
077b3b7
Make create backwards compatible
aristizabal95 Jun 12, 2023
763902c
Don't show report hints if no report specified
aristizabal95 Jun 12, 2023
a0d7b32
Implement summary logic. Refactor logic
aristizabal95 Jun 14, 2023
4940856
Improve summary generation
aristizabal95 Jun 19, 2023
8730c33
Merge branch 'main' of https://github.com/mlcommons/medperf into data…
aristizabal95 Sep 7, 2023
c7708ce
Update YAML, add pandas
aristizabal95 Sep 12, 2023
dc2d2fe
Implement summary changes
aristizabal95 Sep 12, 2023
afaedb8
Remove duplicate definition of function
aristizabal95 Sep 12, 2023
146bb19
Fix dataset tests
aristizabal95 Sep 13, 2023
e556fbc
Fix tests iterating on real filesystem
aristizabal95 Sep 14, 2023
e59606f
Implement monitor dset tool
aristizabal95 Sep 21, 2023
42420ac
Show local path. Highlight changes
aristizabal95 Sep 21, 2023
ca7d97e
Focus on prompt when created
aristizabal95 Sep 21, 2023
1dd4a77
add server changes for data prep reports
hasan7n Sep 22, 2023
0d9c21c
Add highlight colors
aristizabal95 Sep 22, 2023
b850f45
Use data name instead of data hash for summary
aristizabal95 Sep 22, 2023
eec2c66
Use data name instead of data hash
aristizabal95 Sep 22, 2023
7a543d3
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 22, 2023
d9ff55e
make input data hash editable
hasan7n Sep 22, 2023
9a69d0a
add /mlcubes/id/reports endpoint
hasan7n Sep 22, 2023
4be81b5
make benchmark field optional for report
hasan7n Sep 22, 2023
bb71e43
add /me/reports endpoint
hasan7n Sep 22, 2023
84d3bf1
remove unused import
hasan7n Sep 22, 2023
f036f8d
Merge branch 'fets-data-prep-helper' of https://github.com/aristizaba…
aristizabal95 Sep 22, 2023
c0431bc
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 22, 2023
0248658
Store previous highlights
aristizabal95 Sep 22, 2023
9f1db15
Implement report submission
aristizabal95 Sep 25, 2023
72cb4c8
Implement list reports command
aristizabal95 Sep 25, 2023
9a3bada
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 25, 2023
2a727cb
Merge branch 'fets-data-prep-helper' of https://github.com/aristizaba…
aristizabal95 Sep 25, 2023
2138f9c
Add button for copying text
aristizabal95 Sep 26, 2023
fd4b6a6
Merge branch 'main' of https://github.com/mlcommons/medperf into data…
aristizabal95 Sep 26, 2023
d4e1a70
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 26, 2023
d904304
Send execution status on report submission
aristizabal95 Sep 26, 2023
0d5edb0
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 26, 2023
1fcb522
Add option to compress review items
aristizabal95 Sep 27, 2023
509eb2a
Implement manual review helpers
aristizabal95 Sep 28, 2023
7fec124
Improve overflow cases
aristizabal95 Sep 28, 2023
0eecb82
Handle review edge case
aristizabal95 Sep 28, 2023
ac8634c
Fix extrat reviewed case to correct path
aristizabal95 Sep 29, 2023
c52c6bb
Fix dataset create getting stuck by signal
aristizabal95 Oct 2, 2023
0e9b01a
remove unused imports
aristizabal95 Oct 2, 2023
0b6866f
Handle edge cases with copy mechanism
aristizabal95 Oct 2, 2023
0c2f404
Only update report if not empty
aristizabal95 Oct 2, 2023
e8bf6e9
Fix monitoring tool updating on subject num change
aristizabal95 Oct 2, 2023
28a10ca
Allow passing metadata path to data-prep-cubes
aristizabal95 Oct 3, 2023
ed0b79d
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 4, 2023
50671e7
Remove forced copy exception. Package images
aristizabal95 Oct 4, 2023
03b16db
Fix monitoring tool displaying the wrong labels path
aristizabal95 Oct 4, 2023
03e6c4f
Make problem-specific changes more explicit
aristizabal95 Oct 4, 2023
298a4df
Fix report watchdog breaking for unusable report
aristizabal95 Oct 4, 2023
e499813
Remove unnecessary comment
aristizabal95 Oct 4, 2023
6a56d9a
Remove realpath dependency
aristizabal95 Oct 4, 2023
f9317e2
Fix wrong logs path displayed
aristizabal95 Oct 6, 2023
63ed745
Handle cases where report_dict is None
aristizabal95 Oct 6, 2023
a4d9754
Start implementing stage info decoupling
aristizabal95 Oct 19, 2023
9ed01e0
Fix wrong function name
aristizabal95 Oct 19, 2023
dcb3b6b
Include docs_url to report
aristizabal95 Oct 19, 2023
91fa794
Create migration for stages file
aristizabal95 Oct 19, 2023
316b2a1
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 19, 2023
4c7d299
Display report stages during approval
aristizabal95 Oct 20, 2023
e7cae1a
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 20, 2023
fefb6c4
Fix typo
aristizabal95 Oct 20, 2023
a9762f0
Decouple report submission from generation
aristizabal95 Oct 23, 2023
a9a0afe
Display instructions md. Better reviewed handling
aristizabal95 Oct 24, 2023
270e2db
Handle scenario where partial_report is None
aristizabal95 Oct 31, 2023
77ddd08
Allow multiple read attempts for partial report
aristizabal95 Nov 1, 2023
ae9fd1f
Add brain mask to review tarball
aristizabal95 Nov 3, 2023
c0573f0
use finalized folder for review cases
aristizabal95 Nov 3, 2023
70acf75
move finalized cases to finalized folder
aristizabal95 Nov 3, 2023
40aeab8
Handle permission issues when deleting files
aristizabal95 Nov 7, 2023
666cc4b
Implement TUI for review automation
aristizabal95 Nov 8, 2023
8cbb3e7
Pass label instead of segmentation file
aristizabal95 Nov 8, 2023
b5e8760
Add labels file
aristizabal95 Nov 9, 2023
80c33a4
Stop itk-snap from printint to console
aristizabal95 Nov 9, 2023
a9db77e
Add styles to buttons
aristizabal95 Nov 9, 2023
e8b1d04
Merge pull request #3 from aristizabal95/itk-snap-automation
aristizabal95 Nov 9, 2023
3f4379f
Remove stages from CLI
aristizabal95 Nov 13, 2023
d33b011
Remove stages from server
aristizabal95 Nov 13, 2023
eada188
Remove stages migration
aristizabal95 Nov 13, 2023
61cdfc0
Disable summary generation
aristizabal95 Nov 13, 2023
f4a3825
Merge pull request #4 from aristizabal95/data-prep-manual-steps-no-st…
aristizabal95 Nov 14, 2023
79172c7
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Nov 14, 2023
a2c798f
Merge branch 'mlcommons:main' into data-prep-manual-steps
aristizabal95 Nov 14, 2023
4ecd0e2
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Nov 14, 2023
47a3185
Remove stages from config
aristizabal95 Nov 14, 2023
39b1ed4
Use stages file on monitoring tool
aristizabal95 Nov 14, 2023
5cd4037
Improve manual_review instructions
aristizabal95 Nov 14, 2023
a2adb60
improve multiple annotations instructions
aristizabal95 Nov 14, 2023
c328abb
Improved Exact match instructions
aristizabal95 Nov 14, 2023
d36af00
Allow for corrections until done
aristizabal95 Nov 14, 2023
4700594
Fix mark as finalized not working
aristizabal95 Nov 16, 2023
8190b4b
Add unhandled error stages
aristizabal95 Nov 16, 2023
166779c
Ignore tarball files created by monitoring tool
aristizabal95 Nov 21, 2023
1bb3c64
Add out parameter for outputing csv files
aristizabal95 Nov 22, 2023
ce9819e
Fix tarball workflow. Add brainmask button
aristizabal95 Nov 28, 2023
7a92d41
Add documentation about brian mask corrections
aristizabal95 Nov 28, 2023
49a9b46
Handle special rollback scenarios
aristizabal95 Nov 30, 2023
3eca97d
Merge remote-tracking branch 'upstream/main' into dataprepmanual
hasan7n Dec 1, 2023
4b4a57e
use get_folders_hash for new code
hasan7n Dec 1, 2023
0303379
update test example
hasan7n Dec 4, 2023
ad74a79
prevent Django from using watchdog
hasan7n Dec 6, 2023
eda88f7
Remove unused code
aristizabal95 Dec 6, 2023
ecafd94
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 6, 2023
c37a0c2
Handle observer interruption
aristizabal95 Dec 6, 2023
560cd88
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 6, 2023
5cdb66c
Merge remote-tracking branch 'aristizabel/data-prep-manual-steps' int…
hasan7n Dec 6, 2023
d0489e7
update mock example
hasan7n Dec 6, 2023
0a7a00c
many changes
hasan7n Dec 8, 2023
1b419e1
Merge pull request #5 from hasan7n/data-prep-fix-reports
aristizabal95 Dec 8, 2023
c06f7e7
Merge remote-tracking branch 'upstream/main' into dataprepmanual
hasan7n Dec 8, 2023
2e4c113
update integration test mlcube name
hasan7n Dec 8, 2023
4aea7de
auto approve dataset submission
hasan7n Dec 8, 2023
48e10b7
Update stages file
aristizabal95 Dec 8, 2023
e587f54
update used mlcube files URLs
hasan7n Dec 8, 2023
bfcaa15
fix tests, add test for already prepared
hasan7n Dec 8, 2023
0d41a09
remove outdated code
hasan7n Dec 11, 2023
45f4e84
formatter edits
hasan7n Dec 11, 2023
f1f4eef
add note for later
hasan7n Dec 11, 2023
d6512f1
revert new association logic (for another PR)
hasan7n Dec 11, 2023
aeecad2
remove outdated local field "Status" from dataset
hasan7n Dec 11, 2023
5d96a42
private dataset fields + list mlcube datasets
hasan7n Dec 11, 2023
4209680
track dataset submitted as prepared on the server
hasan7n Dec 11, 2023
3d1175c
fix filtering issue
hasan7n Dec 11, 2023
bd85f48
uniqueness constraint only for operation datasets
hasan7n Dec 11, 2023
eb0aaa4
make dataset state readonly on creation
hasan7n Dec 11, 2023
4fc0af9
mlcubes in development by default
hasan7n Dec 11, 2023
8d7856b
benchmark by default development
hasan7n Dec 11, 2023
4e1363b
add input files to tarball
aristizabal95 Dec 11, 2023
52448fa
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 11, 2023
d2bd67f
Merge pull request #6 from aristizabal95/fets-data-prep-helper
aristizabal95 Dec 11, 2023
ce91153
Fix storage path. Add status to list
aristizabal95 Dec 12, 2023
2948d71
Allow specifying dataset paths
aristizabal95 Dec 12, 2023
e8b2dde
Remove unused dependencies
aristizabal95 Dec 12, 2023
a63b754
Display clickable link for docs
aristizabal95 Dec 14, 2023
beec01b
Update tumor mask name. Handle missing brain mask
aristizabal95 Dec 15, 2023
5976a0e
Merge remote-tracking branch 'upstream/main' into dataprepmanual
hasan7n Dec 19, 2023
33166c7
finalize fixing merge conflicts
hasan7n Dec 19, 2023
037b6a0
rename set_operational command
hasan7n Dec 19, 2023
113493b
fixes
hasan7n Dec 19, 2023
a667627
monitoring tool update
hasan7n Dec 19, 2023
8d4faf5
fix tests
hasan7n Dec 19, 2023
c44a083
fix test msg
hasan7n Dec 19, 2023
990ae44
fix auth tests
hasan7n Dec 19, 2023
aff773c
Use status instead of status code for report submisison
aristizabal95 Dec 19, 2023
7a1e679
Improve instructions
aristizabal95 Dec 19, 2023
5f02f6d
Display stage on subject list
aristizabal95 Dec 19, 2023
0061324
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 19, 2023
1244d26
use mlcube better logging
hasan7n Dec 20, 2023
a05b65e
update dataset commands docstrings and params
hasan7n Dec 20, 2023
17e295b
update report submission confirmation msg
hasan7n Dec 20, 2023
395d4a1
Add invalidate button
aristizabal95 Dec 22, 2023
dc7643b
Use consistent naming for invalid state
aristizabal95 Dec 22, 2023
165d8d9
separate code into files/folders. Make monitor installable
aristizabal95 Jan 8, 2024
0803246
remove hardcoded subject-timepoint
aristizabal95 Jan 8, 2024
6a7569c
wait 30seconds before sending reports
hasan7n Jan 9, 2024
f0a2787
add comment
hasan7n Jan 9, 2024
0b008ac
Implement tarball monitoring
aristizabal95 Jan 9, 2024
b83cd19
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Jan 9, 2024
0d546cb
Merge pull request #7 from aristizabal95/rano-monitor
aristizabal95 Jan 9, 2024
63d6129
Fix get review paths calls
aristizabal95 Jan 16, 2024
dc05a32
Merge branch 'rano-monitor' of https://github.com/aristizabal95/medpe…
aristizabal95 Jan 16, 2024
aa33389
Fix error when labels path is empty
aristizabal95 Jan 17, 2024
609c880
Add signal for SIGINT during mlcube call
aristizabal95 Jan 19, 2024
d4342ff
Merge branch 'interrupt-mlcube' of https://github.com/aristizabal95/m…
aristizabal95 Jan 19, 2024
c8bb706
Update class name on tests
aristizabal95 Jan 23, 2024
cef6a00
Merge branch 'main' of https://github.com/mlcommons/medperf into data…
aristizabal95 Jan 23, 2024
5354f69
Fix benchmark submit tests
aristizabal95 Jan 24, 2024
ac4a174
Fix dataset mock object
aristizabal95 Jan 24, 2024
8cb57cd
Fix mlcube run tests
aristizabal95 Jan 24, 2024
04979ea
Undo sigint handler
aristizabal95 Jan 29, 2024
c5b217f
fix mlcube list datasets bug
hasan7n Feb 1, 2024
f736588
show owner when listing datasets
hasan7n Feb 1, 2024
d0d60cd
Merge pull request #8 from hasan7n/server-bug-fix
aristizabal95 Feb 1, 2024
ba01801
Merge remote-tracking branch 'upstream/main' into dataprepmanual
hasan7n Feb 1, 2024
0c27e0b
post-merge main edits
hasan7n Feb 1, 2024
6487d97
mlcube logging hotfix
hasan7n Feb 1, 2024
add0fcc
Merge pull request #9 from hasan7n/merge-main
aristizabal95 Feb 1, 2024
b0aefee
Update rich requirement
aristizabal95 Feb 5, 2024
d237997
Merge remote-tracking branch 'upstream/main' into dataprepmanual
hasan7n Feb 7, 2024
93048d6
Remove test url
aristizabal95 Feb 8, 2024
0b2c63c
polish multithreading in dataset prepare
hasan7n Feb 18, 2024
d0e4ee1
Merge branch 'main' of https://github.com/mlcommons/medperf into data…
aristizabal95 Feb 19, 2024
7a378ca
Merge remote-tracking branch 'upstream/main' into merge-main
hasan7n Feb 21, 2024
520b765
fix integration test not having all cubes as operational
aristizabal95 Feb 21, 2024
845e30a
revert to cleaner method of importing setup
aristizabal95 Feb 21, 2024
0948b07
Merge pull request #12 from aristizabal95/fix-integration-tests
aristizabal95 Feb 21, 2024
22251d0
Merge pull request #10 from hasan7n/fix-threads
aristizabal95 Feb 22, 2024
d6b0e9b
empty commit
aristizabal95 Feb 22, 2024
797d356
Merge remote-tracking branch 'aristizabel/data-prep-manual-steps' int…
hasan7n Feb 22, 2024
072cddb
Merge pull request #11 from hasan7n/merge-main
aristizabal95 Feb 22, 2024
7723700
Merge branch 'data-prep-manual-steps' into main
aristizabal95 Mar 4, 2024
54621ee
Update config.py
aristizabal95 Mar 4, 2024
30a310c
Merge pull request #15 from aristizabal95/main
aristizabal95 Mar 5, 2024
e40737d
add and fix tests and docs (#16)
hasan7n Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/local-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ jobs:

- name: Run client integration tests
working-directory: .
run: sh cli/cli_tests.sh -f
run: sh cli/cli_tests.sh -f

- name: Run manual preparation integration tests
working-directory: .
run: sh cli/cli_test_manual_prep.sh -f
22 changes: 6 additions & 16 deletions cli/auth_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,19 @@ echo "====================================="
echo "Submit cubes"
echo "====================================="

medperf mlcube submit --name prep -m $PREP_MLCUBE -p $PREP_PARAMS
medperf mlcube submit --name prep -m $PREP_MLCUBE -p $PREP_PARAMS --operational
checkFailed "Prep submission failed"
PREP_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)

medperf mlcube submit --name model1 -m $MODEL_MLCUBE -p $MODEL1_PARAMS -a $MODEL_ADD
medperf mlcube submit --name model1 -m $MODEL_MLCUBE -p $MODEL1_PARAMS -a $MODEL_ADD --operational
checkFailed "Model1 submission failed"
MODEL1_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)

# wait 30s to make sure the token will be refreshed under the hood
# (so that this functionality is tested). The chosen place of this is arbitrary
sleep 30

medperf mlcube submit --name metrics -m $METRIC_MLCUBE -p $METRIC_PARAMS
medperf mlcube submit --name metrics -m $METRIC_MLCUBE -p $METRIC_PARAMS --operational
checkFailed "Metrics submission failed"
METRICS_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)
##########################################################
Expand All @@ -117,7 +118,7 @@ echo "\n"
echo "====================================="
echo "Submit benchmark"
echo "====================================="
medperf benchmark submit --name bmk --description bmk --demo-url $DEMO_URL --data-preparation-mlcube $PREP_UID --reference-model-mlcube $MODEL1_UID --evaluator-mlcube $METRICS_UID
medperf benchmark submit --name bmk --description bmk --demo-url $DEMO_URL --data-preparation-mlcube $PREP_UID --reference-model-mlcube $MODEL1_UID --evaluator-mlcube $METRICS_UID --operational
checkFailed "Benchmark submission failed"
BMK_UID=$(medperf benchmark ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)

Expand All @@ -144,19 +145,8 @@ echo "\n"
echo "====================================="
echo "Running data preparation step"
echo "====================================="
medperf dataset create -p $PREP_UID -d $DIRECTORY/dataset_a -l $DIRECTORY/dataset_a --name="dataset_a" --description="mock dataset a" --location="mock location a"
medperf dataset submit -p $PREP_UID -d $DIRECTORY/dataset_a -l $DIRECTORY/dataset_a --name="dataset_a" --description="mock dataset a" --location="mock location a" -y
checkFailed "Data preparation step failed"
DSET_A_GENUID=$(medperf dataset ls | grep dataset_a | tr -s ' ' | cut -d ' ' -f 1)
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data submission step"
echo "====================================="
medperf dataset submit -d $DSET_A_GENUID -y
checkFailed "Data submission step failed"
DSET_A_UID=$(medperf dataset ls | grep dataset_a | tr -s ' ' | cut -d ' ' -f 1)
##########################################################

Expand Down
22 changes: 14 additions & 8 deletions cli/cli_chestxray_tutorial_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,28 @@ medperf profile activate testdata
checkFailed "testdata profile activation failed"
echo "\n"
echo "====================================="
echo "Registering dataset with medperf"
echo "====================================="
medperf dataset submit -b 1 -d $DIRECTORY/sample_raw_data/images -l $DIRECTORY/sample_raw_data/labels --name="nih_chestxray" --description="sample dataset" --location="mock location" -y
checkFailed "Data registration step failed"

echo "\n"
DSET_UID=$(medperf dataset ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)
echo "Dataset UID: $DSET_UID"
echo "====================================="
echo "Running data preparation step"
echo "====================================="
medperf dataset create -b 1 -d $DIRECTORY/sample_raw_data/images -l $DIRECTORY/sample_raw_data/labels --name="nih_chestxray" --description="sample dataset" --location="mock location"
medperf dataset prepare -d $DSET_UID
checkFailed "Data preparation step failed"

echo "\n"
DSET_UID=$(medperf dataset ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 1)
echo "Dataset UID: $DSET_UID"

echo "====================================="
echo "Registering dataset with medperf"
echo "Running data set operational step"
echo "====================================="
medperf dataset submit -d $DSET_UID -y
checkFailed "Data registration step failed"
medperf dataset set_operational -d $DSET_UID -y
checkFailed "Data set operational step failed"

DSET_UID=$(medperf dataset ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)
echo "Dataset UID: $DSET_UID"
echo "====================================="
echo "Creating dataset benchmark association"
echo "====================================="
Expand Down
256 changes: 256 additions & 0 deletions cli/cli_test_manual_prep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
# import setup
. "$(dirname $(realpath "$0"))/tests_setup.sh"

##########################################################
################### Start Testing ########################
##########################################################


##########################################################
echo "=========================================="
echo "Printing MedPerf version"
echo "=========================================="
medperf --version
checkFailed "MedPerf version failed"
##########################################################

echo "\n"

##########################################################
echo "=========================================="
echo "Creating test profiles for each user"
echo "=========================================="
medperf profile activate local
checkFailed "local profile creation failed"

medperf profile create -n testbenchmark
checkFailed "testbenchmark profile creation failed"
medperf profile create -n testmodel
checkFailed "testmodel profile creation failed"
medperf profile create -n testdata
checkFailed "testdata profile creation failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Retrieving mock datasets"
echo "====================================="

DATA_PATH="$(dirname $(dirname $(realpath "$0")))/examples/DataPrepManualSteps/data_prep/mlcube/workspace/input_data"
LABELS_PATH="$(dirname $(dirname $(realpath "$0")))/examples/DataPrepManualSteps/data_prep/mlcube/workspace/input_labels"

PREPARED_DATA_PATH="$(dirname $(dirname $(realpath "$0")))/examples/DataPrepManualSteps/data_prep/mlcube/workspace/prepared_data_example/data"
PREPARED_LABELS_PATH="$(dirname $(dirname $(realpath "$0")))/examples/DataPrepManualSteps/data_prep/mlcube/workspace/prepared_data_example/labels"
##########################################################

echo "\n"

##########################################################
echo "=========================================="
echo "Login each user"
echo "=========================================="
medperf profile activate testbenchmark
checkFailed "testbenchmark profile activation failed"

medperf auth login -e $BENCHMARKOWNER
checkFailed "testbenchmark login failed"

medperf profile activate testmodel
checkFailed "testmodel profile activation failed"

medperf auth login -e $MODELOWNER
checkFailed "testmodel login failed"

medperf profile activate testdata
checkFailed "testdata profile activation failed"

medperf auth login -e $DATAOWNER
checkFailed "testdata login failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Activate modelowner profile"
echo "====================================="
medperf profile activate testmodel
checkFailed "testmodel profile activation failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Submit cubes"
echo "====================================="

PREP_MLCUBE="https://raw.githubusercontent.com/aristizabal95/medperf-2/4aea7de62fd71b377fd3a0b58352d104fd8f9c08/examples/DataPrepManualSteps/data_prep/mlcube/mlcube.yaml"
PREP_PARAMS="https://raw.githubusercontent.com/aristizabal95/medperf-2/4aea7de62fd71b377fd3a0b58352d104fd8f9c08/examples/DataPrepManualSteps/data_prep/mlcube/workspace/parameters.yaml"
medperf mlcube submit --name manprep -m $PREP_MLCUBE -p $PREP_PARAMS
checkFailed "Prep submission failed"
PREP_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2)

##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Activate dataowner profile"
echo "====================================="
medperf profile activate testdata
checkFailed "testdata profile activation failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data creation step"
echo "====================================="
medperf dataset submit -p $PREP_UID -d $DATA_PATH -l $LABELS_PATH --name="manual_a" --description="mock manual a" --location="mock location a" -y
checkFailed "Data submission step failed"
DSET_A_UID=$(medperf dataset ls | grep manual_a | tr -s ' ' | cut -d ' ' -f 2)
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data preparation step (it will fail, needs manual steps)"
echo "====================================="
medperf dataset prepare -d $DSET_A_UID -y
checkSucceeded "Data preparation step should fail"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data preparation step (another way)"
echo "====================================="
echo "y" | medperf dataset prepare -d $DSET_A_UID
checkSucceeded "Data preparation step should fail"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data preparation step (another way)"
echo "====================================="
echo "n" | medperf dataset prepare -d $DSET_A_UID
checkSucceeded "Data preparation step should fail"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Do manual step of the preparation"
echo "====================================="
sed -i 's/0$/1/' $MEDPERF_STORAGE/data/$SERVER_STORAGE_ID/$DSET_A_UID/data/data.csv
checkFailed "manual step failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data preparation step again (this will succeed)"
echo "====================================="
medperf dataset prepare -d $DSET_A_UID -y
checkFailed "Data preparation step failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data set operational step"
echo "====================================="
medperf dataset set_operational -d $DSET_A_UID -y
checkFailed "Data activattion step failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data creation step"
echo "====================================="
medperf dataset submit -p $PREP_UID -d $PREPARED_DATA_PATH -l $PREPARED_LABELS_PATH --name="already_a" --description="mock already a" --location="mock location a" -y --submit-as-prepared
checkFailed "Data submission step failed"
DSET_A_UID=$(medperf dataset ls | grep already_a | tr -s ' ' | cut -d ' ' -f 2)
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data preparation step"
echo "====================================="
medperf dataset prepare -d $DSET_A_UID
checkFailed "Data preparation step failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Running data set operational step"
echo "====================================="
medperf dataset set_operational -d $DSET_A_UID -y
checkFailed "Data activattion step failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Logout users"
echo "====================================="
medperf profile activate testbenchmark
checkFailed "testbenchmark profile activation failed"

medperf auth logout
checkFailed "logout failed"

medperf profile activate testmodel
checkFailed "testmodel profile activation failed"

medperf auth logout
checkFailed "logout failed"

medperf profile activate testdata
checkFailed "testdata profile activation failed"

medperf auth logout
checkFailed "logout failed"
##########################################################

echo "\n"

##########################################################
echo "====================================="
echo "Delete test profiles"
echo "====================================="
medperf profile activate default
checkFailed "default profile activation failed"

medperf profile delete testbenchmark
checkFailed "Profile deletion failed"

medperf profile delete testmodel
checkFailed "Profile deletion failed"

medperf profile delete testdata
checkFailed "Profile deletion failed"
##########################################################

if ${CLEANUP}; then
clean
fi
Loading
Loading