with gpflow.settings.temp_settings(s):
self.m.compile()
self.m._objective(self.m.get_free_state())
self.m._objective(self.m.get_free_state())
for f in glob.glob(s.profiling.output_directory + "timeline_objective_*.json"):
os.remove(f)
After Change
s.profiling.output_file_name = name
with gpflow.settings.temp_settings(s):
m.compile()
opt = gpflow.train.ScipyOptimizer()opt.minimize(m, maxiter=2)
pattern = s.profiling.output_directory + "/{name}*.json".format(name=name)
for filename in glob.glob(pattern):
os.remove(filename)