Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alibylite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Swain Lab
aliby
alibylite
Commits
99e69dfc
Commit
99e69dfc
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
change(pipe): move server_info params one lvl up
parent
47ec962f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aliby/pipeline.py
+17
-10
17 additions, 10 deletions
src/aliby/pipeline.py
with
17 additions
and
10 deletions
src/aliby/pipeline.py
+
17
−
10
View file @
99e69dfc
...
...
@@ -76,9 +76,7 @@ class PipelineParameters(ParametersABC):
directory
=
Path
(
general
.
get
(
"
directory
"
,
"
../data
"
))
with
dispatch_dataset
(
expt_id
,
**
general
.
get
(
"
server_info
"
,
{})
)
as
conn
:
with
dispatch_dataset
(
expt_id
,
**
get_server_info
(
general
))
as
conn
:
directory
=
directory
/
conn
.
unique_name
if
not
directory
.
exists
():
directory
.
mkdir
(
parents
=
True
)
...
...
@@ -288,10 +286,11 @@ class Pipeline(ProcessABC):
"""
config
=
self
.
parameters
.
to_dict
()
expt_id
=
config
[
"
general
"
][
"
id
"
]
distributed
=
config
[
"
general
"
][
"
distributed
"
]
pos_filter
=
config
[
"
general
"
][
"
filter
"
]
root_dir
=
Path
(
config
[
"
general
"
][
"
directory
"
])
general
=
config
[
"
general
"
]
expt_id
=
general
[
"
id
"
]
distributed
=
general
[
"
distributed
"
]
pos_filter
=
general
[
"
filter
"
]
root_dir
=
Path
(
general
[
"
directory
"
])
dispatcher
=
dispatch_dataset
(
expt_id
,
**
self
.
general
.
get
(
"
server_info
"
,
{})
...
...
@@ -314,7 +313,7 @@ class Pipeline(ProcessABC):
# Modify to the configuration
self
.
parameters
.
general
[
"
directory
"
]
=
str
(
directory
)
config
[
"
general
"
]
[
"
directory
"
]
=
directory
general
[
"
directory
"
]
=
directory
self
.
setLogger
(
directory
)
...
...
@@ -400,7 +399,7 @@ class Pipeline(ProcessABC):
min_process_from
=
min
(
process_from
.
values
())
with
get_image_class
(
image_id
)(
image_id
,
**
self
.
general
.
get
(
"
server_info
"
,
{}
)
image_id
,
**
get
_
server_info
(
self
.
general
)
)
as
image
:
# Initialise Steps
...
...
@@ -654,7 +653,7 @@ class Pipeline(ProcessABC):
trackers_state
:
t
.
List
[
np
.
ndarray
]
=
[]
with
get_image_class
(
image_id
)(
image_id
,
**
self
.
general
.
get
(
"
server_info
"
,
{}
)
image_id
,
**
get
_
server_info
(
general_config
)
)
as
image
:
filename
=
Path
(
f
"
{
directory
}
/
{
image
.
name
}
.h5
"
)
meta
=
MetaData
(
directory
,
filename
)
...
...
@@ -731,3 +730,11 @@ class Pipeline(ProcessABC):
def
_close_session
(
session
):
if
session
:
session
.
close
()
def
get_server_info
(
general
:
dict
)
->
t
.
Dict
[
str
,
int
or
str
]:
return
{
k
:
general
[
k
]
for
k
in
(
"
host
"
,
"
username
"
,
"
password
"
)
if
general
.
get
(
k
)
}
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