def test_create_from_string(self):
    logger = TestMetricLogger.create_logger()
    logger2 = MetricLogger.create_from_string(str(logger))
    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_create_from_string(self):
    logger = TestMetricLogger.create_logger()
    logger2 = MetricLogger.create_from_string(str(logger))
    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))