Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institut für Informatik
dbis
software
dbispipeline
Commits
f6b25720
Commit
f6b25720
authored
Mar 25, 2021
by
Michael Vötter
Browse files
Extend check_serializability type convertion.
parent
b2249377
Pipeline
#43045
passed with stage
in 1 minute and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/dbispipeline/utils.py
src/dbispipeline/utils.py
+11
-2
No files found.
src/dbispipeline/utils.py
View file @
f6b25720
...
...
@@ -344,7 +344,8 @@ def write_slurm_job_file(dryrun, force, verbose, restore, mail, plan):
content
=
'#!/bin/bash -l
\n
'
content
+=
'
\n
'
.
join
([
'#SBATCH '
+
x
for
x
in
options
])
venv_manager
=
config
.
get
(
'slurm'
,
'virtual_env_manager'
,
venv_manager
=
config
.
get
(
'slurm'
,
'virtual_env_manager'
,
fallback
=
'pipenv'
)
content
+=
f
'
\n
srun
{
venv_manager
}
run python -m dbispipeline
{
plan
}
'
...
...
@@ -443,6 +444,14 @@ def check_serializability(content,
cleaned
=
pos_inf_replacement
elif
type
(
content
)
==
float
and
np
.
isneginf
(
content
):
cleaned
=
neg_inf_repacement
elif
type
(
content
)
==
np
.
ndarray
:
cleaned
=
content
.
tolist
()
else
:
cleaned
=
content
try
:
# assume numpy type
cleaned
=
content
.
item
()
except
AttributeError
as
ex
:
raise
ValueError
(
f
'Type
\'
{
type
(
content
)
}
\'
is no numpy type.'
)
from
ex
return
cleaned
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment