def test_file_operations(self):
    logger = TestMetricLogger.create_logger()
    save_loc = os.path.join(self.root, 'temp_logger')
    logger.save(save_loc)
    logger2 = MetricLogger.create_from_file(save_loc)
    self.assertEqual(logger.get_data('train_accuracy'), logger2.get_data('train_accuracy'))
    self.assertEqual(logger.get_data('test_accuracy'), logger2.get_data('test_accuracy'))
    self.assertEqual(str(logger), str(logger2))
def test_file_operations(self):
    logger = TestMetricLogger.create_logger()
    save_loc = os.path.join(self.root, 'temp_logger')
    logger.save(save_loc)
    logger2 = MetricLogger.create_from_file(save_loc)
    self.assertEqual(logger.get_data('train_accuracy'), logger2.get_data('train_accuracy'))
    self.assertEqual(logger.get_data('test_accuracy'), logger2.get_data('test_accuracy'))
    self.assertEqual(str(logger), str(logger2))