GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing dolphinscheduler.apache.org — Pytorch — apache-dolphinscheduler 4.1.0-dev documentation PytorchA Pytorch task type’s example and dive into information of PyDolphinScheduler. Example"""A example workflow for task pytorch.""" from pydolphinscheduler.core.workflow import Workflow from pydolphinscheduler.tasks.pytorch import Pytorch with Workflow( name="task_pytorch_example", ) as workflow: # run project with existing environment task_existing_env = Pytorch( name="task_existing_env", script="main.py", script_params="--dry-run --no-cuda", project_path="https://github.com/pytorch/examples#mnist", python_command="/home/anaconda3/envs/pytorch/bin/python3", ) # run project with creating conda environment task_conda_env = Pytorch( name="task_conda_env", script="main.py", script_params="--dry-run --no-cuda", project_path="https://github.com/pytorch/examples#mnist", is_create_environment=True, python_env_tool="conda", requirements="requirements.txt", conda_python_version="3.7", ) # run project with creating virtualenv environment task_virtualenv_env = Pytorch( name="task_virtualenv_env", script="main.py", script_params="--dry-run --no-cuda", project_path="https://github.com/pytorch/examples#mnist", is_create_environment=True, python_env_tool="virtualenv", requirements="requirements.txt", ) # [start resource_limit] pytorch_resources_limit = Pytorch( name="pytorch_resources_limit", script="main.py", script_params="--dry-run --no-cuda", project_path="https://github.com/pytorch/examples#mnist", python_command="/home/anaconda3/envs/pytorch/bin/python3", cpu_quota=1, memory_max=100, ) # [end resource_limit] workflow.submit() Resource Limit ExampleWe can add resource limit like CPU quota and max memory by passing parameters when declaring tasks. pytorch_resources_limit = Pytorch( name="pytorch_resources_limit", script="main.py", script_params="--dry-run --no-cuda", project_path="https://github.com/pytorch/examples#mnist", python_command="/home/anaconda3/envs/pytorch/bin/python3", cpu_quota=1, memory_max=100, ) Dive IntoTask Pytorch.
YAML file example# Define the workflow workflow: name: "Pytorch" # Define the tasks within the workflow tasks: # run project with existing environment - name: task_existing_env task_type: pytorch script: main.py script_params: --dry-run --no-cuda project_path: https://github.com/pytorch/examples#mnist python_command: /home/anaconda3/envs/pytorch/bin/python3 # run project with creating conda environment - name: task_conda_env task_type: pytorch script: main.py script_params: --dry-run --no-cuda project_path: https://github.com/pytorch/examples#mnist is_create_environment: True python_env_tool: conda requirements: requirements.txt conda_python_version: 3.7 # run project with creating virtualenv environment - name: task_virtualenv_env task_type: pytorch script: main.py script_params: --dry-run --no-cuda project_path: https://github.com/pytorch/examples#mnist is_create_environment: True python_env_tool: virtualenv requirements: requirements.txt |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |