Commit f6b25720 authored by Michael Vötter's avatar Michael Vötter
Browse files

Extend check_serializability type convertion.

parent b2249377
Pipeline #43045 passed with stage
in 1 minute and 35 seconds
......@@ -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',
content += f'\nsrun {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()
cleaned = content
# assume numpy type
cleaned = content.item()
except AttributeError as ex:
raise ValueError(
f'Type \'{type(content)}\' is no numpy type.') from ex
return cleaned
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment