def test_init_forecast(forecast_stub, configuration_data): config = Config() config.config = configuration_data dataset_file = DatasetFile("RetailDemandTNPTS.csv", "some_bucket") forecast = config.forecast(dataset_file, "RetailDemandTNPTS") dataset_group = config.dataset_group(dataset_file) assert ( forecast._dataset_group.dataset_group_name == dataset_group.dataset_group_name ) assert forecast._forecast_config == config.config_item(dataset_file, "Forecast")
def test_init_predictor(forecast_stub, configuration_data): config = Config() config.config = configuration_data dataset_file = DatasetFile("RetailDemandTNPTS.csv", "some_bucket") predictor = config.predictor(dataset_file, "RetailDemandTNPTS") predictor.cli = forecast_stub.client assert predictor._dataset_file == dataset_file for k, v in config.config_item(dataset_file, "Predictor").items(): if k != "MaxAge": assert predictor._predictor_params.get(k) == v