damp-lion-88352
@task( task_config=SlurmFunction( slurm_host="<http://ec2-18-207-193-50.compute-1.amazonaws.com|ec2-18-207-193-50.compute-1.amazonaws.com>", srun_conf={ "partition": "debug", "job-name": "fn-task", "output": "/home/ubuntu/fn_task.log" }, script=""" #!/bin/bash # == Pre-Execution == echo "Hello, world!" # Setup env vars export MY_ENV_VAR=456 # Activate virtual env . /home/ubuntu/.cache/pypoetry/virtualenvs/demo-poetry-RLi6T71_-py3.12/bin/activate # == Execute Flyte Task Function == {task.fn} # == Post-Execution == echo "Success!!" """ ) ) def plus_one(x: int) -> int: print(os.getenv("MY_ENV_VAR")) return int(os.getenv("MY_ENV_VAR")) + 1
average-finland-92144
red-school-96573
Flyte enables production-grade orchestration for machine learning workflows and data processing created to accelerate local workflows to production.