fix visualizer/logger race
@@ -89,10 +89,13 @@ class MetricVisualizer(DOMWidget):
training_json = os.path.join(path, 'catboost_training.json')
if os.path.isfile(training_json):
+ try:
with open(training_json, 'r') as json_data:
training_data = json.load(json_data)
data['meta'] = training_data['meta']
data['iterations'] = training_data['iterations']
+ except ValueError:
+ pass
return {
'passed_iterations': data['iterations'][-1]['iteration'] if data['iterations'] else 0,
