Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

config.yml 41 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
  1. version: 2.1
  2. parameters:
  3. remote_docker_version:
  4. type: string
  5. description: remote docker version
  6. default: "20.10.18"
  7. sg_docker_version:
  8. type: string
  9. description: the version of super gradients docker image
  10. default: "2.0.0"
  11. orb_version:
  12. type: string
  13. description: Deci ai ORB version https://circleci.com/developer/orbs/orb/deci-ai/circleci-common-orb
  14. default: "10.5.0"
  15. # default: "dev:alpha"
  16. orbs:
  17. deci-common: deci-ai/circleci-common-orb@<< pipeline.parameters.orb_version >>
  18. aws-ecr: circleci/aws-ecr@8.2.1
  19. docker: circleci/docker@2.2.0
  20. slack: circleci/slack@4.12.0 # see https://circleci.com/developer/orbs/orb/circleci/slack for examples and more
  21. # This filter operates on SemVer2 tags only
  22. release_tag_filter: &release_tag_filter
  23. filters:
  24. branches:
  25. ignore: /.*/
  26. tags:
  27. only: /^\d+\.\d+\.\d+$/
  28. release_candidate_filter: &release_candidate_filter
  29. filters:
  30. branches:
  31. only: master
  32. release_candidate_tag_filter: &release_candidate_tag_filter
  33. filters:
  34. branches:
  35. ignore: /.*/
  36. tags:
  37. only: /^\d+\.\d+\.\d+rc\d+/
  38. commands:
  39. get_beta_and_rc_tags:
  40. description: "getting beta and rc tag (if exist) according to ouir convention"
  41. steps:
  42. - attach_workspace:
  43. at: ~/
  44. - run:
  45. name: push BETA_TAG and RC_TAG variable to BASH_ENV
  46. command: |
  47. if [[ -f ~/BETA_TAG ]]; then
  48. echo 'export BETA_TAG="$(cat ~/BETA_TAG)"' >> "$BASH_ENV"
  49. source $BASH_ENV
  50. fi
  51. if [[ -f ~/RC_TAG ]]; then
  52. echo 'export RC_TAG="$(cat ~/RC_TAG)"' >> "$BASH_ENV"
  53. source $BASH_ENV
  54. fi
  55. echo "RC_TAG=$RC_TAG || BETA_TAG=$BETA_TAG"
  56. adding_tag_to_ecr_container_image:
  57. description: adding a tag to an existing container image
  58. parameters:
  59. image_repo:
  60. type: string
  61. new_image_tag:
  62. type: string
  63. source_image_tag:
  64. type: string
  65. steps:
  66. - deci-common/run_on_dev_account:
  67. command: |
  68. MANIFEST=$(aws ecr batch-get-image --repository-name << parameters.image_repo >> --image-ids imageTag=<< parameters.source_image_tag >> --query 'images[].imageManifest' --output text)
  69. aws ecr put-image --repository-name << parameters.image_repo >> --image-tag << parameters.new_image_tag >> --image-manifest "$MANIFEST"
  70. echo "added tag: << parameters.new_image_tag >> to image: << parameters.image_repo >>:<< parameters.new_image_tag >>"
  71. jobs:
  72. build:
  73. environment:
  74. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  75. parameters:
  76. py_version:
  77. type: string
  78. default: latest
  79. package_name:
  80. type: string
  81. docker:
  82. - image: cimg/python:<< parameters.py_version >>
  83. resource_class: large
  84. steps:
  85. - deci-common/checkout_and_skip_build:
  86. check_version_file: true
  87. skip_md_files: true
  88. - deci-common/get_persisted_version_info
  89. - unless:
  90. condition:
  91. equal: [ master, << pipeline.git.branch >> ]
  92. steps:
  93. - run:
  94. name: install Black Flake8 python linter
  95. command: |
  96. pip install --user -r requirements.dev.txt
  97. - run:
  98. name: Lint all python files changed since develop branch
  99. command: |
  100. flake8 --statistics --config scripts/flake8-config setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
  101. - run:
  102. name: Run Black on changed files against master branch
  103. command: |
  104. black --check setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
  105. - run:
  106. name: add requirements.txt and requirements.pro.txt to source code
  107. command: |
  108. cp requirements.txt src/super_gradients/requirements.txt
  109. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  110. - run:
  111. name: install python dependencies
  112. command: |
  113. python3 -m venv venv
  114. . venv/bin/activate
  115. python3 -m pip install pip==22.0.4
  116. cat requirements.txt | cut -f1 -d"#" | xargs -n 1 -L 1 pip install --progress-bar off
  117. - run:
  118. name: edit package version
  119. command: |
  120. echo "${NEW_VERSION}" > version.txt
  121. cat version.txt
  122. - run:
  123. name: setup custom environment variables
  124. command: |
  125. echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV
  126. echo 'export UPLOAD_LOGS=FALSE' >> $BASH_ENV
  127. - run:
  128. name: install package
  129. no_output_timeout: 30m
  130. command: |
  131. . venv/bin/activate
  132. python3 -m pip install --extra-index-url https://pypi.ngc.nvidia.com .[pro]
  133. - run:
  134. name: run tests with coverage
  135. no_output_timeout: 30m
  136. command: |
  137. . venv/bin/activate
  138. coverage run --source=super_gradients -m unittest tests/deci_core_unit_test_suite_runner.py
  139. coverage report
  140. coverage html # open htmlcov/index.html in a browser
  141. - store_artifacts:
  142. path: htmlcov
  143. - store_artifacts:
  144. path: ~/sg_logs
  145. change_rc_to_b:
  146. description: "change rc in the tag to b"
  147. docker:
  148. - image: cimg/base:stable-20.04
  149. resource_class: small
  150. steps:
  151. - run:
  152. name: change the rc to b
  153. command:
  154. |
  155. BETA_TAG=$(echo ${CIRCLE_TAG} | sed -e 's|rc|b|'); echo ${BETA_TAG} >> ~/BETA_TAG
  156. cat ~/BETA_TAG
  157. - persist_to_workspace:
  158. root: ~/
  159. paths:
  160. - "BETA_TAG"
  161. build_and_publish_sg_container:
  162. description : "building the temp image and pushing to dev ecr"
  163. parameters:
  164. repo_name:
  165. type: string
  166. default: 'deci/super-gradients'
  167. sg_python_version:
  168. type: string
  169. default: $CIRCLE_TAG
  170. docker:
  171. - image: cimg/base:stable-20.04
  172. resource_class: small
  173. steps:
  174. - checkout
  175. - get_beta_and_rc_tags
  176. - run:
  177. command: echo *$BETA_TAG*
  178. - setup_remote_docker:
  179. version: << pipeline.parameters.remote_docker_version >>
  180. docker_layer_caching: true
  181. - deci-common/container_image_build:
  182. dockerfile: scripts/Dockerfile
  183. repository_name: << parameters.repo_name >>
  184. image_tag: "$BETA_TAG"
  185. build_args: 'SG_VERSION=<< parameters.sg_python_version >>'
  186. extra_flags: ' --compress'
  187. - deci-common/push_docker_image_aws_dev:
  188. repository_name: << parameters.repo_name >>
  189. image_tag: "$BETA_TAG"
  190. additional_tags: "latest"
  191. find_rc_tag_per_sha:
  192. description: this command will take the sha of the last commit and find the rc tag it belongs to as ${RC_TAG} variale
  193. docker:
  194. - image: cimg/aws:2022.11.1
  195. resource_class: small
  196. steps:
  197. - checkout
  198. - run:
  199. name: get rc tag of the final tag
  200. command: |
  201. if [[ $(RC_TAG=$(git tag --contains ${CIRCLE_SHA1} | grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+rc[[:digit:]]+' | head -n 1)) ]] ; then
  202. echo "Found RC version: ${RC_TAG}"
  203. echo $RC_TAG >> ~/RC_TAG
  204. else
  205. echo "No Rc Tag found for commit"
  206. circleci-agent step halt
  207. fi
  208. - persist_to_workspace:
  209. root: ~/
  210. paths:
  211. - "RC_TAG"
  212. add_rc_tag_to_beta:
  213. description: in the event of successful test promote beta to rc
  214. parameters:
  215. image_repo:
  216. type: string
  217. default: "deci/super-gradients"
  218. docker:
  219. - image: cimg/base:stable-20.04
  220. resource_class: small
  221. steps:
  222. - get_beta_and_rc_tags
  223. - run:
  224. command: |
  225. echo $BETA_TAG
  226. - adding_tag_to_ecr_container_image:
  227. image_repo: << parameters.image_repo >>
  228. source_image_tag: $BETA_TAG
  229. new_image_tag: $CIRCLE_TAG
  230. add_release_tag_to_rc:
  231. description: in the event of successful test promote rc to release and latest
  232. parameters:
  233. image_repo:
  234. type: string
  235. default: "deci/super-gradients"
  236. docker:
  237. - image: cimg/base:stable-20.04
  238. resource_class: small
  239. steps:
  240. - get_beta_and_rc_tags
  241. - run:
  242. command: |
  243. if [ -z $RC_TAG ] ; then
  244. circleci-agent step halt
  245. else
  246. echo $RC_TAG
  247. fi
  248. - adding_tag_to_ecr_container_image:
  249. image_repo: << parameters.image_repo >>
  250. source_image_tag: $RC_TAG
  251. new_image_tag: ${CIRCLE_TAG}
  252. testing_supergradients_docker_image:
  253. description: "running integration test on the code"
  254. parameters:
  255. image_repo:
  256. type: string
  257. #reserved for testing when will be done
  258. #machine: true
  259. #resource_class: deci-ai/research-standard
  260. docker:
  261. - image: cimg/base:stable-20.04
  262. steps:
  263. - deci-common/ecr_login_dev
  264. - get_beta_and_rc_tags
  265. # - run:
  266. # name: integration test
  267. # #command: sudo docker run -it -e ENVIRONMENT_NAME=production -v ${PWD}:/SG -v /data:/data deciai/super-gradients:3.0.0 python3 ./tests/integration_tests/pretrained_models_test.py
  268. # command: docker run --rm -it --shm-size=2gb --gpus all -v ${PWD}:/SG -v /data:/data << parameters.image_repo >>:<< parameters.image_tag >> python3 -c 'print("it works!")'
  269. - run:
  270. command: echo Hello world
  271. release_candidate:
  272. environment:
  273. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  274. parameters:
  275. py_version:
  276. type: string
  277. docker:
  278. - image: cimg/python:<< parameters.py_version >>
  279. steps:
  280. - deci-common/checkout_and_skip_build:
  281. check_version_file: true
  282. skip_md_files: true
  283. - deci-common/get_persisted_version_info
  284. - run:
  285. name: edit package version
  286. command: |
  287. echo $NEW_VERSION > version.txt
  288. - deci-common/pip_upload_package_codeartifact_dev:
  289. codeartifact_repository: "deci-packages"
  290. - deci-common/pip_test_package_installation_codeartifact_dev:
  291. package_name: "super-gradients"
  292. version: $NEW_VERSION
  293. - deci-common/git_config_automation_user
  294. - run:
  295. name: "commit version file"
  296. command: |
  297. git commit version.txt -m "Deci Services - Changed version to $NEW_VERSION"
  298. - deci-common/git_commit_and_tag:
  299. version: $NEW_VERSION
  300. release_version:
  301. environment:
  302. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  303. parameters:
  304. py_version:
  305. type: string
  306. dev_venv_name:
  307. type: string
  308. default: "dev-sg-${CIRCLE_BUILD_NUM}"
  309. docker:
  310. - image: cimg/python:<< parameters.py_version >>
  311. steps:
  312. - deci-common/checkout_and_skip_build:
  313. check_version_file: true
  314. skip_md_files: false
  315. - run:
  316. name: add requirements.txt and requirements.pro.txt to source code
  317. command: |
  318. cp requirements.txt src/super_gradients/requirements.txt
  319. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  320. - run:
  321. name: edit package version
  322. command: |
  323. echo $CIRCLE_TAG > version.txt
  324. - deci-common/pip_upload_package_codeartifact_all_accounts:
  325. codeartifact_repository: "deci-packages"
  326. - deci-common/pip_test_package_installation_codeartifact_dev:
  327. package_name: "super-gradients"
  328. version: $CIRCLE_TAG
  329. venv_name: << parameters.dev_venv_name >>
  330. - run:
  331. name: verify that the output of __version__ is what we expect
  332. command: |
  333. . << parameters.dev_venv_name >>-super-gradients-$CIRCLE_TAG/bin/activate
  334. python3 tests/verify_version.py $CIRCLE_TAG
  335. - deci-common/pip_test_package_installation_codeartifact_prod:
  336. package_name: "super-gradients"
  337. version: $CIRCLE_TAG
  338. - deci-common/pip_upload_package_codeartifact_prod:
  339. codeartifact_repository: "deci-toolkit"
  340. - deci-common/git_commit_and_tag:
  341. version: $CIRCLE_TAG
  342. delete_remote_tag_before_tagging: true
  343. - deci-common/tag_as:
  344. tag_name: "stable"
  345. delete_remote: true
  346. - deci-common/github_create_release:
  347. github_cli_token: $GITHUB_CLI_TOKEN
  348. directory_to_cd_into: "."
  349. tag: $CIRCLE_TAG
  350. notes: "This GitHub Release was done automatically by CircleCI"
  351. recipe_accuracy_tests:
  352. docker:
  353. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  354. resource_class: deci-ai/sg-gpu-on-premise
  355. parameters:
  356. sg_existing_env_path:
  357. type: string
  358. default: "/env/persistent_env"
  359. sg_new_env_name:
  360. type: string
  361. default: "${CIRCLE_BUILD_NUM}"
  362. sg_new_env_python_version:
  363. type: string
  364. default: "python3.8"
  365. steps:
  366. - checkout
  367. - run:
  368. name: install requirements and run recipe tests
  369. command: |
  370. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  371. source << parameters.sg_new_env_name >>/bin/activate
  372. python3.8 -m pip install --upgrade setuptools pip wheel
  373. python3.8 -m pip install -r requirements.txt
  374. python3.8 -m pip install .
  375. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  376. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_pose_dekr_w32_no_dc experiment_name=shortened_coco2017_pose_dekr_w32_ap_test batch_size=4 val_batch_size=8 epochs=1 training_hyperparams.lr_warmup_steps=0 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=1000 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  377. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cifar10_resnet experiment_name=shortened_cifar10_resnet_accuracy_test epochs=100 training_hyperparams.average_best_models=False multi_gpu=DDP num_gpus=4
  378. python3.8 src/super_gradients/examples/convert_recipe_example/convert_recipe_example.py --config-name=cifar10_conversion_params experiment_name=shortened_cifar10_resnet_accuracy_test
  379. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox experiment_name=shortened_coco2017_yolox_n_map_test architecture=yolox_n training_hyperparams.loss=yolox_fast_loss epochs=10 training_hyperparams.average_best_models=False multi_gpu=DDP num_gpus=4
  380. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_regseg48 experiment_name=shortened_cityscapes_regseg48_iou_test epochs=10 training_hyperparams.average_best_models=False multi_gpu=DDP num_gpus=4
  381. coverage run --source=super_gradients -m unittest tests/deci_core_recipe_test_suite_runner.py
  382. - run:
  383. name: Remove new environment when failed
  384. command: "rm -r << parameters.sg_new_env_name >>"
  385. when: on_fail
  386. recipe_sanity_tests_classification_pt1:
  387. docker:
  388. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  389. resource_class: deci-ai/sg-gpu-on-premise
  390. parameters:
  391. sg_existing_env_path:
  392. type: string
  393. default: "/env/persistent_env"
  394. sg_new_env_name:
  395. type: string
  396. default: "${CIRCLE_BUILD_NUM}"
  397. sg_new_env_python_version:
  398. type: string
  399. default: "python3.8"
  400. steps:
  401. - checkout
  402. - run:
  403. name: install requirements and run classification sanity tests
  404. command: |
  405. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  406. source << parameters.sg_new_env_name >>/bin/activate
  407. ls /data/
  408. python3.8 -m pip install --upgrade setuptools pip wheel
  409. python3.8 -m pip install -r requirements.txt
  410. python3.8 -m pip install .
  411. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  412. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY600 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  413. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY800 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  414. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_repvgg batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  415. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_resnet50 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  416. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_vit_base batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  417. python3.8 src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py --config-name=imagenet_resnet50_kd batch_size=8 val_batch_size=8 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  418. - run:
  419. name: Remove new environment when failed
  420. command: "rm -r << parameters.sg_new_env_name >>"
  421. when: on_fail
  422. recipe_sanity_tests_classification_pt2:
  423. docker:
  424. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  425. resource_class: deci-ai/sg-gpu-on-premise
  426. parameters:
  427. sg_existing_env_path:
  428. type: string
  429. default: "/env/persistent_env"
  430. sg_new_env_name:
  431. type: string
  432. default: "${CIRCLE_BUILD_NUM}"
  433. sg_new_env_python_version:
  434. type: string
  435. default: "python3.8"
  436. steps:
  437. - checkout
  438. - run:
  439. name: install requirements and run classification sanity tests
  440. command: |
  441. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  442. source << parameters.sg_new_env_name >>/bin/activate
  443. python3.8 -m pip install --upgrade setuptools pip wheel
  444. python3.8 -m pip install -r requirements.txt
  445. python3.8 -m pip install .
  446. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  447. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_efficientnet batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  448. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv2 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  449. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_large batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  450. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_small batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  451. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY200 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  452. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY400 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4 dataset_params.train_dataset_params.root=/data/Imagenet/train dataset_params.val_dataset_params.root=/data/Imagenet/val
  453. - run:
  454. name: Remove new environment when failed
  455. command: "rm -r << parameters.sg_new_env_name >>"
  456. when: on_fail
  457. recipe_sanity_tests_segmentation:
  458. docker:
  459. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  460. resource_class: deci-ai/sg-gpu-on-premise
  461. parameters:
  462. sg_existing_env_path:
  463. type: string
  464. default: "/env/persistent_env"
  465. sg_new_env_name:
  466. type: string
  467. default: "${CIRCLE_BUILD_NUM}"
  468. sg_new_env_python_version:
  469. type: string
  470. default: "python3.8"
  471. steps:
  472. - checkout
  473. - run:
  474. name: install requirements and run segmentation sanity tests
  475. command: |
  476. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  477. source << parameters.sg_new_env_name >>/bin/activate
  478. python3.8 -m pip install --upgrade setuptools pip wheel
  479. python3.8 -m pip install -r requirements.txt
  480. python3.8 -m pip install .
  481. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  482. wget -O $(pwd)/checkpoints/ddrnet23_slim_bb_imagenet.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_slim_bb_imagenet.pth
  483. wget -O $(pwd)/checkpoints/ddrnet23_bb_imagenet.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_bb_imagenet.pth
  484. wget -O $(pwd)/checkpoints/ddrnet39_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet39_bb_imagenet.pth
  485. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet checkpoint_params.checkpoint_path=$(pwd)/checkpoints/ddrnet23_bb_imagenet.pth batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  486. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim checkpoint_params.checkpoint_path=$(pwd)/checkpoints/ddrnet23_slim_bb_imagenet.pth batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  487. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet checkpoint_params.checkpoint_path=$(pwd)/checkpoints/ddrnet39_imagenet_pretrained.pth architecture=ddrnet_39 batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  488. wget -O $(pwd)/checkpoints/stdc1_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc1_imagenet_pretrained.pth
  489. wget -O $(pwd)/checkpoints/stdc2_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc2_imagenet_pretrained.pth
  490. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc1_imagenet_pretrained.pth architecture=pp_lite_t_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  491. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc2_imagenet_pretrained.pth architecture=pp_lite_b_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  492. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc1_imagenet_pretrained.pth architecture=pp_lite_t_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  493. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc2_imagenet_pretrained.pth architecture=pp_lite_b_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  494. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc1_imagenet_pretrained.pth batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  495. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc2_imagenet_pretrained.pth architecture=stdc2_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  496. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc1_imagenet_pretrained.pth batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  497. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75 checkpoint_params.checkpoint_path=$(pwd)/checkpoints/stdc2_imagenet_pretrained.pth architecture=stdc2_seg batch_size=3 val_batch_size=3 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  498. - run:
  499. name: Remove new environment when failed
  500. command: "rm -r << parameters.sg_new_env_name >>"
  501. when: on_fail
  502. recipe_sanity_tests_detection:
  503. docker:
  504. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  505. resource_class: deci-ai/sg-gpu-on-premise
  506. parameters:
  507. sg_existing_env_path:
  508. type: string
  509. default: "/env/persistent_env"
  510. sg_new_env_name:
  511. type: string
  512. default: "${CIRCLE_BUILD_NUM}"
  513. sg_new_env_python_version:
  514. type: string
  515. default: "python3.8"
  516. steps:
  517. - checkout
  518. - run:
  519. name: install requirements and run detection sanity tests
  520. command: |
  521. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  522. source << parameters.sg_new_env_name >>/bin/activate
  523. python3.8 -m pip install --upgrade setuptools pip wheel
  524. python3.8 -m pip install -r requirements.txt
  525. python3.8 -m pip install .
  526. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  527. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ssd_lite_mobilenet_v2 batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  528. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_n batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  529. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_t batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  530. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_s batch_size=8 val_batch_size=16 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  531. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_m batch_size=8 val_batch_size=8 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  532. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_l batch_size=4 val_batch_size=8 epochs=1 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=100 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  533. - run:
  534. name: Remove new environment when failed
  535. command: "rm -r << parameters.sg_new_env_name >>"
  536. when: on_fail
  537. recipe_sanity_tests_pose_estimation:
  538. docker:
  539. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  540. resource_class: deci-ai/sg-gpu-on-premise
  541. parameters:
  542. sg_existing_env_path:
  543. type: string
  544. default: "/env/persistent_env"
  545. sg_new_env_name:
  546. type: string
  547. default: "${CIRCLE_BUILD_NUM}"
  548. sg_new_env_python_version:
  549. type: string
  550. default: "python3.8"
  551. steps:
  552. - checkout
  553. - run:
  554. name: install requirements and run pose estimation sanity tests
  555. command: |
  556. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  557. source << parameters.sg_new_env_name >>/bin/activate
  558. python3.8 -m pip install --upgrade setuptools pip wheel
  559. python3.8 -m pip install -r requirements.txt
  560. python3.8 -m pip install .
  561. python3.8 -m pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  562. python3.8 src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_pose_dekr_w32_no_dc experiment_name=shortened_coco2017_pose_dekr_w32_ap_test batch_size=4 val_batch_size=8 epochs=1 training_hyperparams.lr_warmup_steps=0 training_hyperparams.average_best_models=False training_hyperparams.max_train_batches=1000 training_hyperparams.max_valid_batches=100 multi_gpu=DDP num_gpus=4
  563. - run:
  564. name: Remove new environment when failed
  565. command: "rm -r << parameters.sg_new_env_name >>"
  566. when: on_fail
  567. workflows:
  568. release:
  569. jobs:
  570. - deci-common/persist_version_info:
  571. version_override: $CIRCLE_TAG
  572. <<: *release_tag_filter
  573. - deci-common/codeartifact_login:
  574. name: "login_to_codeartifact_release"
  575. repo_name: "deci-packages"
  576. <<: *release_tag_filter
  577. - build:
  578. name: "build3.7"
  579. py_version: "3.7"
  580. package_name: "super-gradients"
  581. requires:
  582. - deci-common/persist_version_info
  583. - login_to_codeartifact_release
  584. <<: *release_tag_filter
  585. - recipe_sanity_tests_classification_pt1:
  586. <<: *release_tag_filter
  587. - recipe_sanity_tests_classification_pt2:
  588. requires:
  589. - recipe_sanity_tests_classification_pt1
  590. <<: *release_tag_filter
  591. - recipe_sanity_tests_segmentation:
  592. requires:
  593. - recipe_sanity_tests_classification_pt2
  594. <<: *release_tag_filter
  595. - recipe_sanity_tests_detection:
  596. requires:
  597. - recipe_sanity_tests_segmentation
  598. <<: *release_tag_filter
  599. - recipe_sanity_tests_pose_estimation:
  600. requires:
  601. - recipe_sanity_tests_detection
  602. <<: *release_tag_filter
  603. - recipe_accuracy_tests:
  604. requires:
  605. - recipe_sanity_tests_pose_estimation
  606. <<: *release_tag_filter
  607. - release_version:
  608. py_version: "3.7"
  609. requires:
  610. - "build3.7"
  611. - recipe_accuracy_tests
  612. - recipe_sanity_tests_classification_pt1
  613. - recipe_sanity_tests_classification_pt2
  614. - recipe_sanity_tests_segmentation
  615. - recipe_sanity_tests_detection
  616. - recipe_sanity_tests_pose_estimation
  617. <<: *release_tag_filter
  618. - deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
  619. package_name: "super-gradients"
  620. name: "upload_super_gradients_to_pypi"
  621. version: $CIRCLE_TAG
  622. requires:
  623. - "release_version"
  624. context:
  625. - pypi-supergradients
  626. <<: *release_tag_filter
  627. build_and_deploy:
  628. jobs:
  629. - deci-common/persist_version_info:
  630. use_rc: true
  631. use_beta: false
  632. version_override: ""
  633. - build:
  634. name: "build3.7"
  635. py_version: "3.7"
  636. package_name: "super-gradients"
  637. requires:
  638. - deci-common/persist_version_info
  639. - deci-common/codeartifact_login:
  640. repo_name: "deci-packages"
  641. <<: *release_candidate_filter
  642. - release_candidate: # happens on merge
  643. py_version: "3.7"
  644. requires:
  645. - "build3.7"
  646. - deci-common/codeartifact_login
  647. <<: *release_candidate_filter
  648. SG_docker:
  649. jobs:
  650. - change_rc_to_b: # works on release candidate creation
  651. <<: *release_candidate_tag_filter
  652. - build_and_publish_sg_container: # works on release candidate creation
  653. requires:
  654. - "change_rc_to_b"
  655. <<: *release_candidate_tag_filter
  656. - testing_supergradients_docker_image: # works on release candidate creation
  657. image_repo: '307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/super-gradients'
  658. requires:
  659. - "build_and_publish_sg_container"
  660. - "change_rc_to_b"
  661. <<: *release_candidate_tag_filter
  662. - add_rc_tag_to_beta: # works on release candidate creation for ECR Repo
  663. requires:
  664. - "testing_supergradients_docker_image"
  665. - "change_rc_to_b"
  666. <<: *release_candidate_tag_filter
  667. - find_rc_tag_per_sha: # works on release
  668. <<: *release_tag_filter
  669. - add_release_tag_to_rc: # works on release
  670. requires:
  671. - "find_rc_tag_per_sha"
  672. <<: *release_tag_filter
  673. - slack/on-hold:
  674. context: slack
  675. channel: "sg-integration-tests"
  676. requires:
  677. - "add_release_tag_to_rc"
  678. <<: *release_tag_filter
  679. - hold-sg-public-release: # works on release
  680. type: approval
  681. requires:
  682. - "slack/on-hold"
  683. <<: *release_tag_filter
  684. - docker/publish: # works on release
  685. executor:
  686. image: cimg/base
  687. tag: stable-20.04
  688. name: docker/docker
  689. image: deciai/super-gradients
  690. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  691. update-description: true
  692. use-buildkit: true
  693. use-remote-docker: true
  694. use-docker-credentials-store: true
  695. path: ./scripts
  696. readme: ../README.md
  697. tag: latest,${CIRCLE_TAG}
  698. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG}' #building from scratch as it faster and cheaper than download and retag
  699. requires:
  700. - "hold-sg-public-release"
  701. <<: *release_tag_filter
  702. - docker/publish: # works on release
  703. executor:
  704. image: cimg/base
  705. tag: stable-20.04
  706. name: docker/docker
  707. image: deciai/super-gradients
  708. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  709. update-description: false
  710. use-buildkit: true
  711. use-remote-docker: true
  712. use-docker-credentials-store: true
  713. path: ./scripts
  714. tag: ${CIRCLE_TAG}-runtime
  715. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG} --build-arg DOCKER_IMAGE_TAG=11.3.1-runtime-ubuntu20.04'
  716. requires:
  717. - "hold-sg-public-release"
  718. <<: *release_tag_filter
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...