Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Christopher Randolph Rhodes
model_server
Commits
2dfd9037
Commit
2dfd9037
authored
11 months ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Reformatted data embedding assertion, track axis tags in model object
parent
060f6991
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!37
Release 2024.04.19
,
!34
Revert "Temporary error-handling for debug..."
,
!29
Dev multichannel classifiers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model_server/extensions/ilastik/models.py
+10
-7
10 additions, 7 deletions
model_server/extensions/ilastik/models.py
with
10 additions
and
7 deletions
model_server/extensions/ilastik/models.py
+
10
−
7
View file @
2dfd9037
...
...
@@ -36,6 +36,7 @@ class IlastikModel(Model):
raise
ParameterExpectedError
(
'
Ilastik model expects a project (*.ilp) file
'
)
self
.
shell
=
None
self
.
axes
=
None
super
().
__init__
(
autoload
,
params
)
def
load
(
self
):
...
...
@@ -53,18 +54,20 @@ class IlastikModel(Model):
shell
=
app
.
main
(
args
,
init_logging
=
False
)
# validate if inputs are embedded in project file
input_groups
=
shell
.
projectManager
.
currentProjectFile
[
'
Input Data
'
][
'
infos
'
]
lanes
=
input_groups
.
keys
()
for
ll
in
lanes
:
input_types
=
input_groups
[
ll
]
for
tt
in
input_types
:
ds_loc
=
input_groups
[
ll
][
tt
].
get
(
'
location
'
,
False
)
if
self
.
enforce_embedded
and
ds_loc
and
ds_loc
[()]
==
b
'
FileSystem
'
:
h5
=
shell
.
projectManager
.
currentProjectFile
for
lane
in
h5
[
'
Input Data/infos
'
].
keys
():
for
role
in
h5
[
f
'
Input Data/infos/
{
lane
}
'
].
keys
():
grp
=
h5
[
f
'
Input Data/infos/
{
lane
}
/
{
role
}
'
]
if
self
.
enforce_embedded
and
(
'
location
'
in
grp
.
keys
())
and
grp
[
'
location
'
][()]
!=
b
'
ProjectInternal
'
:
raise
IlastikInputEmbedding
(
'
Cannot load ilastik project file where inputs are on filesystem
'
)
assert
True
if
not
isinstance
(
shell
.
workflow
,
self
.
get_workflow
()):
raise
ParameterExpectedError
(
f
'
Ilastik project file
{
self
.
project_file
}
does not describe an instance of
{
shell
.
workflow
.
__class__
}
'
)
self
.
axes
=
[
a
[
'
key
'
].
upper
()
for
a
in
json
.
loads
(
h5
[
f
'
Input Data/infos/lane0000/Raw Data/axistags
'
][()])[
'
axes
'
]
]
self
.
shell
=
shell
return
True
...
...
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