Commit 70ce1646 authored by Samuel GAIST's avatar Samuel GAIST

[execution][base] Import simplejson as json to make it easy to swap

parent 0e362bc6
......@@ -47,7 +47,7 @@ import os
import glob
import collections
import logging
import simplejson
import simplejson as json
from .. import schema
from .. import database
......@@ -417,7 +417,7 @@ class BaseExecutor(object):
return stats.io_statistics(self.data, self.input_list, self.output_list)
def __str__(self):
return simplejson.dumps(self.data, indent=4)
return json.dumps(self.data, indent=4)
def write(self, path):
"""Writes contents to precise filesystem location"""
......@@ -431,7 +431,7 @@ class BaseExecutor(object):
data = convert_experiment_configuration_to_container(self.data)
with open(os.path.join(directory, "configuration.json"), "wb") as f:
json_data = simplejson.dumps(data, indent=2)
json_data = json.dumps(data, indent=2)
f.write(json_data.encode("utf-8"))
tmp_prefix = os.path.join(directory, "prefix")
......@@ -447,7 +447,7 @@ class BaseExecutor(object):
"""Exports contents useful for a backend runner to run the algorithm"""
with open(os.path.join(directory, "configuration.json"), "wb") as f:
json_data = simplejson.dumps(self.data, indent=2)
json_data = json.dumps(self.data, indent=2)
f.write(json_data.encode("utf-8"))
tmp_prefix = os.path.join(directory, "prefix")
......
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