def test_tcn_forecaster_runtime_error(self):
    (train_data, val_data, test_data) = create_data()
    forecaster = LSTMForecaster(past_seq_len=24, input_feature_num=2, output_feature_num=2, loss='mae', lr=0.01)
    with pytest.raises(RuntimeError):
        with tempfile.TemporaryDirectory() as tmp_dir_name:
            ckpt_name = os.path.join(tmp_dir_name, 'ckpt')
            forecaster.save(ckpt_name)
    with pytest.raises(RuntimeError):
        forecaster.predict(test_data[0])
    with pytest.raises(RuntimeError):
        forecaster.evaluate(test_data)
def test_tcn_forecaster_runtime_error(self):
    (train_data, val_data, test_data) = create_data()
    forecaster = LSTMForecaster(past_seq_len=24, input_feature_num=2, output_feature_num=2, loss='mae', lr=0.01)
    with pytest.raises(RuntimeError):
        with tempfile.TemporaryDirectory() as tmp_dir_name:
            ckpt_name = os.path.join(tmp_dir_name, 'ckpt')
            forecaster.save(ckpt_name)
    with pytest.raises(RuntimeError):
        forecaster.predict(test_data[0])
    with pytest.raises(RuntimeError):
        forecaster.evaluate(test_data)