Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVLT
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
ALMF
SVLT
Commits
4d28155b
Commit
4d28155b
authored
5 months ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Tests pass
parent
83cbc10c
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/api.py
+2
-2
2 additions, 2 deletions
model_server/base/api.py
model_server/base/session.py
+1
-1
1 addition, 1 deletion
model_server/base/session.py
tests/base/test_session.py
+9
-6
9 additions, 6 deletions
tests/base/test_session.py
with
12 additions
and
9 deletions
model_server/base/api.py
+
2
−
2
View file @
4d28155b
...
...
@@ -55,8 +55,8 @@ def watch_output_path(path: str):
@app.get
(
'
/session/restart
'
)
def
restart_session
(
root
:
str
=
None
)
->
dict
:
session
.
restart
(
root
=
root
)
def
restart_session
()
->
dict
:
session
.
restart
()
return
session
.
describe_loaded_models
()
...
...
This diff is collapsed.
Click to expand it.
model_server/base/session.py
+
1
−
1
View file @
4d28155b
...
...
@@ -298,7 +298,7 @@ class _Session(object):
return
None
def
restart
(
self
,
**
kwargs
):
self
.
__init__
(
**
kwargs
)
self
.
__init__
()
# create singleton instance
...
...
This diff is collapsed.
Click to expand it.
tests/base/test_session.py
+
9
−
6
View file @
4d28155b
...
...
@@ -15,14 +15,17 @@ class TestGetSessionObject(unittest.TestCase):
self
.
assertTrue
(
exists
(
self
.
sesh
.
logfile
),
'
Session did not create a log file in the correct place
'
)
def
test_changing_session_root_creates_new_directory
(
self
):
from
model_server.conf.defaults
import
root
old_paths
=
self
.
sesh
.
get_paths
()
newroot
=
root
/
'
subdir
'
self
.
sesh
.
restart
(
root
=
newroot
)
self
.
sesh
.
restart
()
new_paths
=
self
.
sesh
.
get_paths
()
for
k
in
old_paths
.
keys
():
self
.
assertTrue
(
new_paths
[
k
].
__str__
().
startswith
(
newroot
.
__str__
()))
self
.
assertEqual
(
old_paths
[
'
logs
'
].
parent
.
parent
,
new_paths
[
'
logs
'
].
parent
.
parent
)
self
.
assertNotEqual
(
old_paths
[
'
logs
'
].
parent
,
new_paths
[
'
logs
'
].
parent
)
def
test_change_session_subdirectory
(
self
):
old_paths
=
self
.
sesh
.
get_paths
()
...
...
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