Skip to content
Snippets Groups Projects
Commit 2de2e513 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'add-directory-creation-ptemcee' into 'master'

Add a check that the directory exists to prevent failure

See merge request !839
parents 3557c881 f777927f
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from ..utils import logger
from ..utils import logger, check_directory_exists_and_if_not_mkdir
from .base_sampler import SamplerError, MCMCSampler
......@@ -517,6 +517,7 @@ class Ptemcee(MCMCSampler):
sys.exit(self.exit_code)
def write_current_state(self, plot=True):
check_directory_exists_and_if_not_mkdir(self.outdir)
checkpoint(
self.iteration,
self.outdir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment