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

Add a check that the directory exists to prevent failure

parent fb0db4eb
No related branches found
No related tags found
1 merge request!839Add a check that the directory exists to prevent failure
Pipeline #143060 passed
......@@ -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