Commit cc79c29d authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Remove obsolete outdir and label

parent 3a5771ef
......@@ -77,15 +77,14 @@ class Result(dict):
logging.debug("Unable to decode item")
return item
def get_result_dictionary(self):
return dict(self)
def save_to_file(self, outdir, label):
def save_to_file(self):
""" Writes the Result to a deepdish h5 file """
file_name = result_file_name(outdir, label)
if os.path.isdir(outdir) is False:
file_name = result_file_name(self.outdir, self.label)
if os.path.isdir(self.outdir) is False:
if os.path.isfile(file_name):
'Renaming existing file {} to {}.old'.format(file_name,
......@@ -526,7 +526,7 @@ def run_sampler(likelihood, priors=None, label='label', outdir='outdir',
# result.prior = prior # Removed as this breaks the saving of the data
result.samples_to_data_frame(likelihood=likelihood, priors=priors, conversion_function=conversion_function)
result.kwargs = sampler.kwargs
result.save_to_file(outdir=outdir, label=label)
if plot:
return result
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