Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LarvaTagger.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
LarvaTagger.jl
Commits
a3d92ab4
Commit
a3d92ab4
authored
1 year ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
python version numbers all frozen + test testPredictWithConflictingInput
parent
349d0e3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!17
Set of commits to be tagged v0.18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Manifest.toml
+2
-2
2 additions, 2 deletions
Manifest.toml
recipes/Dockerfile
+1
-0
1 addition, 0 deletions
recipes/Dockerfile
test/deploy_and_test.sh
+1
-1
1 addition, 1 deletion
test/deploy_and_test.sh
test/scenarii.sh
+30
-2
30 additions, 2 deletions
test/scenarii.sh
with
34 additions
and
5 deletions
Manifest.toml
+
2
−
2
View file @
a3d92ab4
...
...
@@ -1037,11 +1037,11 @@ version = "0.3.3"
[[deps.PlanarLarvae]]
deps
=
[
"DelimitedFiles"
,
"HDF5"
,
"JSON3"
,
"LinearAlgebra"
,
"MAT"
,
"Meshes"
,
"OrderedCollections"
,
"Random"
,
"SHA"
,
"StaticArrays"
,
"Statistics"
,
"StatsBase"
,
"StructTypes"
]
git-tree-sha1
=
"
6b2dc28d56bcef101672cbf2bb784bbd5d88d579
"
git-tree-sha1
=
"
d964d040e319fe3bd9140e5bf91d648de6acc96f
"
repo-rev
=
"main"
repo-url
=
"https://gitlab.pasteur.fr/nyx/PlanarLarvae.jl"
uuid
=
"c2615984-ef14-4d40-b148-916c85b43307"
version
=
"0.1
5
.0"
version
=
"0.1
6
.0"
[[deps.PlotUtils]]
deps
=
[
"ColorSchemes"
,
"Colors"
,
"Dates"
,
"PrecompileTools"
,
"Printf"
,
"Random"
,
"Reexport"
,
"Statistics"
]
...
...
This diff is collapsed.
Click to expand it.
recipes/Dockerfile
+
1
−
0
View file @
a3d92ab4
...
...
@@ -77,6 +77,7 @@ RUN if [ -z $TAGGINGBACKENDS_BRANCH ]; then \
&&
git clone
--depth
1
--no-tags
--single-branch
-b
$(
echo
$BACKEND
|
cut
-d
/
-f2
)
https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA
\
&&
cd
MaggotUBA
\
&&
rm
-rf
.git
\
&&
(
cat
requirements.txt | xargs
-I
% sh
-c
'poetry add "%"'
)
\
&&
poetry
install
--only
main
\
&&
poetry add
"pynvml==11.4.1"
\
&&
if
[
"
$(
echo
$BACKEND
|
cut
-d
/
-f2
)
"
=
"main"
]
||
[
"
$(
echo
$BACKEND
|
cut
-d
/
-f2
)
"
=
"dev"
]
;
then
\
...
...
This diff is collapsed.
Click to expand it.
test/deploy_and_test.sh
+
1
−
1
View file @
a3d92ab4
...
...
@@ -97,7 +97,7 @@ if [ -f ../../LarvaTagger_test_data.tgz ]; then
# KEEP_MODEL_FILES=1 ./deploy_and_test.sh
# cd LarvaTagger/LarvaTagger.jl
# rm -rf test/data/test_train_*
# cp -
ra
../MaggotUBA/models/test_train_* test/data/
# cp -
Rp
../MaggotUBA/models/test_train_* test/data/
# tar zcvf LarvaTagger_test_data.tgz test/data/*
# mv LarvaTagger_test_data.tgz ../../
tar
zxvf ../../LarvaTagger_test_data.tgz
...
...
This diff is collapsed.
Click to expand it.
test/scenarii.sh
+
30
−
2
View file @
a3d92ab4
...
...
@@ -50,9 +50,10 @@ endTest() {
prepareTestData
()
{
tmpdir
=
"
$SHUNIT_TMPDIR
/
$1
"
shift
rm
-rf
"
$tmpdir
"
mkdir
-p
"
$tmpdir
"
for
file
in
sample.spine sample.outline
;
do
for
file
in
sample.spine sample.outline
$@
;
do
cp
"
$datapath
/
$file
"
"
$tmpdir
/"
||
exit
1
done
echo
$tmpdir
...
...
@@ -123,6 +124,33 @@ testPredictDefault() {
endTest
}
# requires: sample.spine sample.outline trx.mat original_predictions.label test_train_default/predicted.label
testPredictWithConflictingInput
()
{
tagger
=
"test_train_default
$tagger_suffix
"
# make test data
touch
"
$datapath
/spurious.txt"
tmpdir
=
$(
prepareTestData
$tagger
trx.mat original_predictions.label spurious.txt
)
# restore the model
mkdir
-p
"
$maggotuba
/models"
rm
-rf
"
$maggotuba
/models/
$tagger
"
echo
"cp -Rp
\"
$datapath
/
$tagger
\"
\"
$maggotuba
/models/
\"
"
cp
-Rp
"
$datapath
/
$tagger
"
"
$maggotuba
/models/"
[
-f
"
$maggotuba
/models/
$tagger
/clf_config.json"
]
||
exit
1
# run
cd
"
$project_root
"
echo
"
\"
$larvataggerjl
\"
predict
\"
$maggotuba
\"
$tagger
\"
$tmpdir
\"
--debug"
"
$larvataggerjl
"
predict
"
$maggotuba
"
$tagger
"
$tmpdir
"
--debug
# compare
filename
=
predicted.label
predictions
=
"
$tmpdir
/
$filename
"
expected_labels
=
"
$datapath
/
$tagger
/
$filename
"
assertFalse
"
\`
predict
\`
failed to generate file
$filename
"
'[ -z "$predictions" ]'
assertTrue
"
\`
predict
\`
failed to reproduce file
$filename
"
'$(cmp "$expected_labels" "$predictions")'
# clean up
rm
-f
"
$datapath
/spurious.txt"
endTest
}
# requires: sample.spine sample.outline original_predictions.label test_train_default/*
testTrainDefault
()
{
tagger
=
"test_train_default
$tagger_suffix
"
...
...
@@ -238,7 +266,7 @@ postTrain() {
assertTrue
"
\`
train
\`
failed to reproduce file
$enc_weights
"
'$(cmp "$expected_tagger_dir/$enc_weights" "$enc_weights_path")'
assertTrue
"
\`
train
\`
failed to reproduce file
$enc_config
"
'$(cmp "$expected_tagger_dir/$enc_config" "$enc_config_path")'
assertTrue
"
\`
train
\`
failed to reproduce file
$clf_weights
"
'$(cmp "$expected_tagger_dir/$clf_weights" "$clf_weights_path")'
assertTrue
"
\`
train
\`
failed to reproduce file
$clf_config
"
'
$(cmp
"$expected_tagger_dir/$clf_config" "$clf_config_path"
)
'
assertTrue
"
\`
train
\`
failed to reproduce file
$clf_config
"
'
[ -z "$(diff
"$expected_tagger_dir/$clf_config" "$clf_config_path"
| grep -E "^[<>] " | grep -vE larva_dataset_.*[.]hdf5)" ]
'
# test the predictions
echo
"
\"
$larvataggerjl
\"
predict
\"
$maggotuba
\"
$tagger
\"
$tmpdir
/sample.spine
\"
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment