Created
December 21, 2020 18:47
-
-
Save rushtehrani/0ef76e504acfa8ff5e8f20422be627fb to your computer and use it in GitHub Desktop.
DETR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arguments: | |
parameters: | |
- name: source | |
value: https://github.com/onepanelio/detr.git | |
displayName: Model source code | |
type: hidden | |
visibility: private | |
- name: cvat-annotation-path | |
value: annotation-dump/sample_dataset | |
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. | |
displayName: Dataset path | |
visibility: private | |
- name: cvat-output-path | |
value: workflow-data/output/sample_output | |
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. | |
displayName: Workflow output path | |
visibility: private | |
- name: dump-format | |
value: cvat_coco | |
visibility: public | |
- name: pytorch-image | |
displayName: Select image | |
value: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime | |
visibility: public | |
type: select.select | |
options: | |
- name: 'PyTorch GPU Image' | |
value: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime | |
- name: 'PyTorch CPU Image' | |
value: pytorch/pytorch:latest | |
- name: sys-node-pool | |
value: Standard_NC6 | |
displayName: Node pool | |
visibility: public | |
type: select.select | |
options: | |
- name: 'CPU: 2, RAM: 8GB' | |
value: Standard_D2s_v3 | |
- name: 'CPU: 4, RAM: 16GB' | |
value: Standard_D4s_v3 | |
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' | |
value: Standard_NC6 | |
- name: epochs | |
displayName: Epochs | |
value: '50' | |
visibility: public | |
- name: batch-size | |
displayName: Batch size | |
value: '1' | |
visibility: public | |
entrypoint: main | |
templates: | |
- dag: | |
tasks: | |
- name: train-model | |
template: detr | |
name: main | |
- container: | |
args: | |
- | | |
apt-get update \ | |
&& apt-get install -y build-essential \ | |
&& pip install cython pycocotools scipy \ | |
&& python /mnt/src/prepare_data.py \ | |
&& python /mnt/src/main.py --coco_path=/mnt/data/datasets/ --output_dir=/mnt/output/ --batch_size={{workflow.parameters.batch-size}} --epochs={{workflow.parameters.epochs}} | |
command: | |
- sh | |
- -c | |
image: onepanel/jupyterlab:1.0.1 | |
volumeMounts: | |
- mountPath: /mnt/data | |
name: data | |
- mountPath: /mnt/output | |
name: output | |
workingDir: /mnt/src | |
nodeSelector: | |
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' | |
inputs: | |
artifacts: | |
- name: data | |
path: /mnt/data/datasets/ | |
s3: | |
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' | |
- git: | |
repo: '{{workflow.parameters.source}}' | |
name: src | |
path: /mnt/src | |
name: detr | |
outputs: | |
artifacts: | |
- name: model | |
optional: true | |
path: /mnt/output | |
s3: | |
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' | |
volumeClaimTemplates: | |
- metadata: | |
creationTimestamp: null | |
name: data | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 200Gi | |
- metadata: | |
creationTimestamp: null | |
name: output | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 200Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment