def run_state(state=None, deploy=False): """Run State level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 7, 6) output_dir = build_params.OUTPUT_DIR if deploy: output_dir = WEB_DEPLOY_PATH run.run_state_level_forecast(min_date, max_date, country="USA", state=state, output_dir=output_dir)
def run_state(version: data_version.DataVersion, output, state=None): """Run State level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 8, 21) run.run_state_level_forecast(min_date, max_date, output, country="USA", state=state) _logger.info(f"Wrote output to {output}") # only write the version if we saved everything if not state: version.write_file("states", output) else: _logger.info("Skip version file because this is not a full run")
def run_state(version: data_version.DataVersion, state=None, deploy=False): """Run State level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 7, 6) output_dir = build_params.OUTPUT_DIR if deploy: output_dir = WEB_DEPLOY_PATH run.run_state_level_forecast(min_date, max_date, country="USA", state=state, output_dir=output_dir) _logger.info(f'Wrote output to {output_dir}') # only write the version if we saved everything if not state: version.write_file('states', output_dir) else: _logger.info('Skip version file because this is not a full run')