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
82b77d5e
Commit
82b77d5e
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Succcessful test running ilastik pixel classification over API
parent
ba186562
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_ilastik.py
+18
-1
18 additions, 1 deletion
tests/test_ilastik.py
tests/test_model.py
+1
-1
1 addition, 1 deletion
tests/test_model.py
with
19 additions
and
2 deletions
tests/test_ilastik.py
+
18
−
1
View file @
82b77d5e
...
...
@@ -110,6 +110,9 @@ class TestIlastikOverApi(TestServerBaseClass):
rj
=
resp_list
.
json
()
self
.
assertEqual
(
rj
[
model_id
][
'
class
'
],
'
IlastikPixelClassifierModel
'
)
return
model_id
def
test_load_ilastik_object_model
(
self
):
resp_load
=
requests
.
put
(
self
.
uri
+
'
models/ilastik/object_classification/load/
'
,
...
...
@@ -121,4 +124,18 @@ class TestIlastikOverApi(TestServerBaseClass):
resp_list
=
requests
.
get
(
self
.
uri
+
'
models
'
)
self
.
assertEqual
(
resp_list
.
status_code
,
200
)
rj
=
resp_list
.
json
()
self
.
assertEqual
(
rj
[
model_id
][
'
class
'
],
'
IlastikObjectClassifierModel
'
)
\ No newline at end of file
self
.
assertEqual
(
rj
[
model_id
][
'
class
'
],
'
IlastikObjectClassifierModel
'
)
def
test_ilastik_infer_pixel_probability
(
self
):
TestServerBaseClass
.
copy_input_file_to_server
()
model_id
=
self
.
test_load_ilastik_pixel_model
()
resp_infer
=
requests
.
put
(
self
.
uri
+
f
'
infer/from_image_file
'
,
params
=
{
'
model_id
'
:
model_id
,
'
input_filename
'
:
czifile
[
'
filename
'
],
'
channel
'
:
2
,
},
)
self
.
assertEqual
(
resp_infer
.
status_code
,
200
,
resp_infer
.
content
.
decode
())
This diff is collapsed.
Click to expand it.
tests/test_model.py
+
1
−
1
View file @
82b77d5e
import
unittest
from
conf.testing
import
czifile
from
model_server.image
import
CziImageFileAccessor
from
model_server.model
import
DummyImageToImageModel
,
CouldNotLoadModelError
,
Model
from
model_server.model
import
DummyImageToImageModel
,
CouldNotLoadModelError
class
TestCziImageFileAccess
(
unittest
.
TestCase
):
def
setUp
(
self
)
->
None
:
...
...
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