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
64dfe514
Commit
64dfe514
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Moved RoiSet method dependencies over to base
parent
89aeb7db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
model_server/base/annotators.py
+0
-0
0 additions, 0 deletions
model_server/base/annotators.py
model_server/base/roiset.py
+1
-1
1 addition, 1 deletion
model_server/base/roiset.py
tests/test_session.py
+5
-5
5 additions, 5 deletions
tests/test_session.py
with
6 additions
and
6 deletions
model_server/
extensions/chaeo
/annotators.py
→
model_server/
base
/annotators.py
+
0
−
0
View file @
64dfe514
File moved
This diff is collapsed.
Click to expand it.
model_server/base/roiset.py
+
1
−
1
View file @
64dfe514
...
...
@@ -16,7 +16,7 @@ from sklearn.linear_model import LinearRegression
from
model_server.base.accessors
import
GenericImageDataAccessor
,
InMemoryDataAccessor
,
write_accessor_data_to_file
from
model_server.base.models
import
InstanceSegmentationModel
from
model_server.base.process
import
pad
,
rescale
,
resample_to_8bit
,
make_rgb
from
model_server.extensions.chaeo
.annotators
import
draw_box_on_patch
,
draw_contours_on_patch
,
draw_boxes_on_3d_image
from
base
.annotators
import
draw_box_on_patch
,
draw_contours_on_patch
,
draw_boxes_on_3d_image
from
model_server.extensions.chaeo.accessors
import
write_patch_to_file
,
MonoPatchStack
,
Multichannel3dPatchStack
from
base.process
import
mask_largest_object
...
...
This diff is collapsed.
Click to expand it.
tests/test_session.py
+
5
−
5
View file @
64dfe514
import
pathlib
import
unittest
from
model_server.base.models
import
Dummy
ImageToImage
Model
from
model_server.base.models
import
Dummy
SemanticSegmentation
Model
from
model_server.base.session
import
Session
class
TestGetSessionObject
(
unittest
.
TestCase
):
...
...
@@ -63,7 +63,7 @@ class TestGetSessionObject(unittest.TestCase):
def
test_session_loads_model
(
self
):
sesh
=
Session
()
MC
=
Dummy
ImageToImage
Model
MC
=
Dummy
SemanticSegmentation
Model
success
=
sesh
.
load_model
(
MC
)
self
.
assertTrue
(
success
)
loaded_models
=
sesh
.
describe_loaded_models
()
...
...
@@ -77,7 +77,7 @@ class TestGetSessionObject(unittest.TestCase):
def
test_session_loads_second_instance_of_same_model
(
self
):
sesh
=
Session
()
MC
=
Dummy
ImageToImage
Model
MC
=
Dummy
SemanticSegmentation
Model
sesh
.
load_model
(
MC
)
sesh
.
load_model
(
MC
)
self
.
assertIn
(
MC
.
__name__
+
'
_00
'
,
sesh
.
models
.
keys
())
...
...
@@ -86,7 +86,7 @@ class TestGetSessionObject(unittest.TestCase):
def
test_session_loads_model_with_params
(
self
):
sesh
=
Session
()
MC
=
Dummy
ImageToImage
Model
MC
=
Dummy
SemanticSegmentation
Model
p1
=
{
'
p1
'
:
'
abc
'
}
success
=
sesh
.
load_model
(
MC
,
params
=
p1
)
self
.
assertTrue
(
success
)
...
...
@@ -103,7 +103,7 @@ class TestGetSessionObject(unittest.TestCase):
def
test_session_finds_existing_model_with_different_path_formats
(
self
):
sesh
=
Session
()
MC
=
Dummy
ImageToImage
Model
MC
=
Dummy
SemanticSegmentation
Model
p1
=
{
'
path
'
:
'
c:
\\
windows
\\
dummy.pa
'
}
p2
=
{
'
path
'
:
'
c:/windows/dummy.pa
'
}
mid
=
sesh
.
load_model
(
MC
,
params
=
p1
)
...
...
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