cuddly-jelly-27016
05/14/2025, 12:11 AM@workflow
def batch_inference_pipeline(model_path: str, scaler_path: str) -> int:
inference_inputs = prepare_inference_inputs(model_path=model_path, scaler_path=scaler_path)
batch_inference(inference_inputs=inference_inputs)
return 0
config = AWSBatchConfig(
platformCapabilities="EC2",
)
@task(requests=Resources(mem="16Gi", cpu="8"), task_config=config)
def batch_inference(inference_inputs: List[InferenceInput]) -> int:
# pool = multiprocessing.Pool()
# pool.map(inference, inference_inputs)
for inference_input in inference_inputs:
inference(inference_input)
return 0
https://flyte-org.slack.com/archives/C01P3B761A6/p1664980783943249
### Screenshots
[image](https://user-images.githubusercontent.com/106815366/195532546-631816cc-bd55-4c36-aa4e-13974f948b9e.png)▾
[image](https://user-images.githubusercontent.com/106815366/195533043-c8c18fcf-0add-42c5-8070-5c860c2bac43.png)▾
[image](https://user-images.githubusercontent.com/106815366/195533858-86a7aad1-7c5c-4598-bb53-8053c0c4f7cb.png)▾