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 45 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
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
  1. version: 2.1
  2. parameters:
  3. ad_hoc_container_build:
  4. type: boolean
  5. default: false
  6. ad_hoc_container_build_code_only:
  7. type: boolean
  8. default: false
  9. remote_docker_version:
  10. type: string
  11. description: remote docker version
  12. default: "20.10.18"
  13. sg_docker_version:
  14. type: string
  15. description: the version of super gradients docker image
  16. default: "2.0.0"
  17. build_py_version:
  18. type: string
  19. description: Python version
  20. default: "3.8"
  21. run_sanity_tests_flow:
  22. type: boolean
  23. description: If true will run sanity_test flow
  24. default: false
  25. skip_md_files:
  26. type: boolean
  27. default: true
  28. orb_version:
  29. type: string
  30. description: Deci ai ORB version https://circleci.com/developer/orbs/orb/deci-ai/circleci-common-orb
  31. default: "10.5.1"
  32. # default: "dev:alpha"
  33. orbs:
  34. deci-common: deci-ai/circleci-common-orb@<< pipeline.parameters.orb_version >>
  35. aws-ecr: circleci/aws-ecr@8.2.1
  36. docker: circleci/docker@2.2.0
  37. slack: circleci/slack@4.12.0 # see https://circleci.com/developer/orbs/orb/circleci/slack for examples and more
  38. # This filter operates on SemVer2 tags only
  39. release_tag_filter: &release_tag_filter
  40. filters:
  41. branches:
  42. ignore: /.*/
  43. tags:
  44. only: /^\d+\.\d+\.\d+$/
  45. release_candidate_filter: &release_candidate_filter
  46. filters:
  47. branches:
  48. only: master
  49. release_candidate_tag_filter: &release_candidate_tag_filter
  50. filters:
  51. branches:
  52. ignore: /.*/
  53. tags:
  54. only: /^\d+\.\d+\.\d+rc\d+/
  55. commands:
  56. build_and_publish_command:
  57. parameters:
  58. repo_name:
  59. type: string
  60. docker_context:
  61. type: string
  62. image_tag:
  63. type: string
  64. additional_tags:
  65. type: string
  66. build_args:
  67. type: string
  68. default: ""
  69. dockerfile:
  70. type: string
  71. default: "Dockerfile"
  72. steps:
  73. - checkout
  74. - attach_workspace:
  75. at: ~/
  76. - run:
  77. name: Put config dir in repo context
  78. command: |
  79. if [ -d ~/.config ]; then
  80. echo "found a .config directory, copying to repo dir"
  81. cp -r ~/.config ~/project/<< parameters.docker_context >>
  82. fi
  83. - deci-common/ecr_login_dev
  84. - deci-common/container_image_build:
  85. context: << parameters.docker_context >>
  86. working_directory: "."
  87. repository_name: << parameters.repo_name >>
  88. image_tag: << parameters.image_tag >>
  89. dockerfile: << parameters.dockerfile >>
  90. build_args: << parameters.build_args >>
  91. # build_args: "PYTHON_VERSION=3.8 SG_VERSION=3.0.7"
  92. - deci-common/push_docker_image_aws_dev:
  93. repository_name: << parameters.repo_name >>
  94. image_tag: << parameters.image_tag >>
  95. additional_tags: << parameters.additional_tags >>
  96. get_beta_and_rc_tags:
  97. description: "getting beta and rc tag (if exist) according to ouir convention"
  98. steps:
  99. - attach_workspace:
  100. at: ~/
  101. - run:
  102. name: push BETA_TAG and RC_TAG variable to BASH_ENV
  103. command: |
  104. if [[ -f ~/BETA_TAG ]]; then
  105. echo 'export BETA_TAG="$(cat ~/BETA_TAG)"' >> "$BASH_ENV"
  106. source $BASH_ENV
  107. fi
  108. if [[ -f ~/RC_TAG ]]; then
  109. echo 'export RC_TAG="$(cat ~/RC_TAG)"' >> "$BASH_ENV"
  110. source $BASH_ENV
  111. fi
  112. echo "RC_TAG=$RC_TAG || BETA_TAG=$BETA_TAG"
  113. adding_tag_to_ecr_container_image:
  114. description: adding a tag to an existing container image
  115. parameters:
  116. image_repo:
  117. type: string
  118. new_image_tag:
  119. type: string
  120. source_image_tag:
  121. type: string
  122. steps:
  123. - deci-common/run_on_dev_account:
  124. command: |
  125. MANIFEST=$(aws ecr batch-get-image --repository-name << parameters.image_repo >> --image-ids imageTag=<< parameters.source_image_tag >> --query 'images[].imageManifest' --output text)
  126. aws ecr put-image --repository-name << parameters.image_repo >> --image-tag << parameters.new_image_tag >> --image-manifest "$MANIFEST"
  127. echo "added tag: << parameters.new_image_tag >> to image: << parameters.image_repo >>:<< parameters.new_image_tag >>"
  128. jobs:
  129. build:
  130. environment:
  131. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  132. parameters:
  133. py_version:
  134. type: string
  135. default: latest
  136. package_name:
  137. type: string
  138. docker:
  139. - image: cimg/python:<< parameters.py_version >>
  140. resource_class: large
  141. steps:
  142. - deci-common/checkout_and_skip_build:
  143. check_version_file: true
  144. skip_md_files: << pipeline.parameters.skip_md_files >>
  145. - deci-common/get_persisted_version_info
  146. - unless:
  147. condition:
  148. equal: [ master, << pipeline.git.branch >> ]
  149. steps:
  150. - run:
  151. name: install Black Flake8 python linter
  152. command: |
  153. pip install --user -r requirements.dev.txt
  154. - run:
  155. name: Lint all python files changed since develop branch
  156. command: |
  157. 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/')
  158. - run:
  159. name: Run Black on changed files against master branch
  160. command: |
  161. black --check setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
  162. - run:
  163. name: add requirements.txt and requirements.pro.txt to source code
  164. command: |
  165. cp requirements.txt src/super_gradients/requirements.txt
  166. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  167. - run:
  168. name: install python dependencies
  169. command: |
  170. python3 -m venv venv
  171. . venv/bin/activate
  172. python3 -m pip install pip==23.1.2
  173. python3 -m pip install -r requirements.txt
  174. - run:
  175. name: edit package version
  176. command: |
  177. echo "${NEW_VERSION}" > version.txt
  178. cat version.txt
  179. - run:
  180. name: setup custom environment variables
  181. command: |
  182. echo 'export UPLOAD_LOGS=FALSE' >> $BASH_ENV
  183. - run:
  184. name: install package
  185. no_output_timeout: 30m
  186. command: |
  187. . venv/bin/activate
  188. python3 -m pip uninstall -y super_gradients
  189. python3 -m pip install -e .[pro] --extra-index-url https://pypi.ngc.nvidia.com
  190. - run:
  191. name: install pytorch quantization package
  192. no_output_timeout: 30m
  193. command: |
  194. . venv/bin/activate
  195. python3 -m pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidia.com
  196. python3 -m pip install onnx_graphsurgeon==0.3.27 --extra-index-url https://pypi.ngc.nvidia.com
  197. - run:
  198. name: run tests with coverage
  199. no_output_timeout: 30m
  200. command: |
  201. . venv/bin/activate
  202. coverage run --source=super_gradients -m unittest tests/deci_core_unit_test_suite_runner.py
  203. coverage report
  204. coverage html # open htmlcov/index.html in a browser
  205. - run:
  206. name: run breaking change test
  207. no_output_timeout: 30m
  208. command: |
  209. . venv/bin/activate
  210. python -m pip install gitpython==3.1.0
  211. python src/super_gradients/common/code_analysis/breaking_change.py --verbose --fail-on-error
  212. - store_artifacts:
  213. path: htmlcov
  214. - store_artifacts:
  215. path: ~/sg_logs
  216. change_rc_to_b:
  217. description: "change rc in the tag to b"
  218. docker:
  219. - image: cimg/base:stable-20.04
  220. resource_class: small
  221. steps:
  222. - run:
  223. name: change the rc to b
  224. command:
  225. |
  226. BETA_TAG=$(echo ${CIRCLE_TAG} | sed -e 's|rc|b|'); echo ${BETA_TAG} >> ~/BETA_TAG
  227. cat ~/BETA_TAG
  228. - persist_to_workspace:
  229. root: ~/
  230. paths:
  231. - "BETA_TAG"
  232. build_and_publish_sg_container:
  233. description : "building the temp image and pushing to dev ecr"
  234. parameters:
  235. repo_name:
  236. type: string
  237. default: 'deci/super-gradients'
  238. sg_python_version:
  239. type: string
  240. default: $CIRCLE_TAG
  241. docker:
  242. - image: cimg/base:stable-20.04
  243. resource_class: small
  244. steps:
  245. - checkout
  246. - get_beta_and_rc_tags
  247. - run:
  248. command: echo *$BETA_TAG*
  249. - setup_remote_docker:
  250. version: << pipeline.parameters.remote_docker_version >>
  251. docker_layer_caching: true
  252. - deci-common/container_image_build:
  253. dockerfile: scripts/Dockerfile
  254. repository_name: << parameters.repo_name >>
  255. image_tag: "$BETA_TAG"
  256. build_args: 'SG_VERSION=<< parameters.sg_python_version >>'
  257. extra_flags: ' --compress'
  258. - deci-common/push_docker_image_aws_dev:
  259. repository_name: << parameters.repo_name >>
  260. image_tag: "$BETA_TAG"
  261. additional_tags: "latest"
  262. find_rc_tag_per_sha:
  263. description: this command will take the sha of the last commit and find the rc tag it belongs to as ${RC_TAG} variale
  264. docker:
  265. - image: cimg/aws:2022.11.1
  266. resource_class: small
  267. steps:
  268. - checkout
  269. - run:
  270. name: get rc tag of the final tag
  271. command: |
  272. if [[ $(RC_TAG=$(git tag --contains ${CIRCLE_SHA1} | grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+rc[[:digit:]]+' | head -n 1)) ]] ; then
  273. echo "Found RC version: ${RC_TAG}"
  274. echo $RC_TAG >> ~/RC_TAG
  275. else
  276. echo "No Rc Tag found for commit"
  277. circleci-agent step halt
  278. fi
  279. - persist_to_workspace:
  280. root: ~/
  281. paths:
  282. - "RC_TAG"
  283. add_rc_tag_to_beta:
  284. description: in the event of successful test promote beta to rc
  285. parameters:
  286. image_repo:
  287. type: string
  288. default: "deci/super-gradients"
  289. docker:
  290. - image: cimg/base:stable-20.04
  291. resource_class: small
  292. steps:
  293. - get_beta_and_rc_tags
  294. - run:
  295. command: |
  296. echo $BETA_TAG
  297. - adding_tag_to_ecr_container_image:
  298. image_repo: << parameters.image_repo >>
  299. source_image_tag: $BETA_TAG
  300. new_image_tag: $CIRCLE_TAG
  301. add_release_tag_to_rc:
  302. description: in the event of successful test promote rc to release and latest
  303. parameters:
  304. image_repo:
  305. type: string
  306. default: "deci/super-gradients"
  307. docker:
  308. - image: cimg/base:stable-20.04
  309. resource_class: small
  310. steps:
  311. - get_beta_and_rc_tags
  312. - run:
  313. command: |
  314. if [ -z $RC_TAG ] ; then
  315. circleci-agent step halt
  316. else
  317. echo $RC_TAG
  318. fi
  319. - adding_tag_to_ecr_container_image:
  320. image_repo: << parameters.image_repo >>
  321. source_image_tag: $RC_TAG
  322. new_image_tag: ${CIRCLE_TAG}
  323. testing_supergradients_docker_image:
  324. description: "running integration test on the code"
  325. parameters:
  326. image_repo:
  327. type: string
  328. #reserved for testing when will be done
  329. #machine: true
  330. #resource_class: deci-ai/research-standard
  331. docker:
  332. - image: cimg/base:stable-20.04
  333. steps:
  334. - deci-common/ecr_login_dev
  335. - get_beta_and_rc_tags
  336. # - run:
  337. # name: integration test
  338. # #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
  339. # 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!")'
  340. - run:
  341. command: echo Hello world
  342. release_candidate:
  343. environment:
  344. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  345. parameters:
  346. py_version:
  347. type: string
  348. docker:
  349. - image: cimg/python:<< parameters.py_version >>
  350. steps:
  351. - deci-common/checkout_and_skip_build:
  352. check_version_file: true
  353. skip_md_files: true
  354. - deci-common/get_persisted_version_info
  355. - run:
  356. name: edit package version
  357. command: |
  358. echo $NEW_VERSION > version.txt
  359. - deci-common/pip_upload_package_codeartifact_dev:
  360. codeartifact_repository: "deci-packages"
  361. - deci-common/pip_test_package_installation_codeartifact_dev:
  362. package_name: "super-gradients"
  363. version: $NEW_VERSION
  364. - deci-common/git_config_automation_user
  365. - run:
  366. name: "commit version file"
  367. command: |
  368. git commit version.txt -m "Deci Services - Changed version to $NEW_VERSION"
  369. - deci-common/git_commit_and_tag:
  370. version: $NEW_VERSION
  371. release_version:
  372. environment:
  373. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  374. parameters:
  375. py_version:
  376. type: string
  377. dev_venv_name:
  378. type: string
  379. default: "dev-sg-${CIRCLE_BUILD_NUM}"
  380. docker:
  381. - image: cimg/python:<< parameters.py_version >>
  382. steps:
  383. - deci-common/checkout_and_skip_build:
  384. check_version_file: true
  385. skip_md_files: false
  386. - run:
  387. name: add requirements.txt and requirements.pro.txt to source code
  388. command: |
  389. cp requirements.txt src/super_gradients/requirements.txt
  390. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  391. - run:
  392. name: edit package version
  393. command: |
  394. echo $CIRCLE_TAG > version.txt
  395. - deci-common/pip_upload_package_codeartifact_all_accounts:
  396. codeartifact_repository: "deci-packages"
  397. - deci-common/pip_test_package_installation_codeartifact_dev:
  398. package_name: "super-gradients"
  399. version: $CIRCLE_TAG
  400. venv_name: << parameters.dev_venv_name >>
  401. - run:
  402. name: verify that the output of __version__ is what we expect
  403. command: |
  404. . << parameters.dev_venv_name >>-super-gradients-$CIRCLE_TAG/bin/activate
  405. python3 tests/verify_version.py $CIRCLE_TAG
  406. - deci-common/pip_test_package_installation_codeartifact_prod:
  407. package_name: "super-gradients"
  408. version: $CIRCLE_TAG
  409. - deci-common/pip_upload_package_codeartifact_prod:
  410. codeartifact_repository: "deci-toolkit"
  411. - deci-common/git_commit_and_tag:
  412. version: $CIRCLE_TAG
  413. delete_remote_tag_before_tagging: true
  414. - deci-common/tag_as:
  415. tag_name: "stable"
  416. delete_remote: true
  417. - deci-common/github_create_release:
  418. github_cli_token: $GITHUB_CLI_TOKEN
  419. directory_to_cd_into: "."
  420. tag: $CIRCLE_TAG
  421. notes: "This GitHub Release was done automatically by CircleCI"
  422. recipe_accuracy_tests:
  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 recipe 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 torchvision torchaudio
  447. python3.8 -m pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidia.com
  448. python3.8 tests/verify_min_samples_ddp.py
  449. python3.8 src/super_gradients/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
  450. python3.8 src/super_gradients/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
  451. 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
  452. python3.8 src/super_gradients/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
  453. python3.8 src/super_gradients/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
  454. coverage run --source=super_gradients -m unittest tests/deci_core_recipe_test_suite_runner.py
  455. - run:
  456. name: Remove new environment when failed
  457. command: "rm -r << parameters.sg_new_env_name >>"
  458. when: on_fail
  459. - slack/notify:
  460. channel: "sg-integration-tests"
  461. event: fail
  462. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  463. recipe_sanity_tests_classification_pt1:
  464. docker:
  465. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  466. resource_class: deci-ai/sg-gpu-on-premise
  467. parameters:
  468. sg_existing_env_path:
  469. type: string
  470. default: "/env/persistent_env"
  471. sg_new_env_name:
  472. type: string
  473. default: "${CIRCLE_BUILD_NUM}"
  474. sg_new_env_python_version:
  475. type: string
  476. default: "python3.8"
  477. steps:
  478. - checkout
  479. - run:
  480. name: install requirements and run classification sanity tests
  481. command: |
  482. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  483. source << parameters.sg_new_env_name >>/bin/activate
  484. ls /data/
  485. python3.8 -m pip install --upgrade setuptools pip wheel
  486. python3.8 -m pip install -r requirements.txt
  487. python3.8 -m pip install .
  488. python3.8 -m pip install torch torchvision torchaudio
  489. python3.8 src/super_gradients/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
  490. python3.8 src/super_gradients/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
  491. python3.8 src/super_gradients/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
  492. python3.8 src/super_gradients/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
  493. python3.8 src/super_gradients/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
  494. python3.8 src/super_gradients/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
  495. - run:
  496. name: Remove new environment when failed
  497. command: "rm -r << parameters.sg_new_env_name >>"
  498. when: on_fail
  499. - slack/notify:
  500. channel: "sg-integration-tests"
  501. event: fail
  502. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  503. recipe_sanity_tests_classification_pt2:
  504. docker:
  505. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  506. resource_class: deci-ai/sg-gpu-on-premise
  507. parameters:
  508. sg_existing_env_path:
  509. type: string
  510. default: "/env/persistent_env"
  511. sg_new_env_name:
  512. type: string
  513. default: "${CIRCLE_BUILD_NUM}"
  514. sg_new_env_python_version:
  515. type: string
  516. default: "python3.8"
  517. steps:
  518. - checkout
  519. - run:
  520. name: install requirements and run classification sanity tests
  521. command: |
  522. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  523. source << parameters.sg_new_env_name >>/bin/activate
  524. python3.8 -m pip install --upgrade setuptools pip wheel
  525. python3.8 -m pip install -r requirements.txt
  526. python3.8 -m pip install .
  527. python3.8 -m pip install torch torchvision torchaudio
  528. python3.8 src/super_gradients/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
  529. python3.8 src/super_gradients/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
  530. python3.8 src/super_gradients/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
  531. python3.8 src/super_gradients/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
  532. python3.8 src/super_gradients/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
  533. python3.8 src/super_gradients/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
  534. - run:
  535. name: Remove new environment when failed
  536. command: "rm -r << parameters.sg_new_env_name >>"
  537. when: on_fail
  538. - slack/notify:
  539. channel: "sg-integration-tests"
  540. event: fail
  541. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  542. recipe_sanity_tests_segmentation:
  543. docker:
  544. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  545. resource_class: deci-ai/sg-gpu-on-premise
  546. parameters:
  547. sg_existing_env_path:
  548. type: string
  549. default: "/env/persistent_env"
  550. sg_new_env_name:
  551. type: string
  552. default: "${CIRCLE_BUILD_NUM}"
  553. sg_new_env_python_version:
  554. type: string
  555. default: "python3.8"
  556. steps:
  557. - checkout
  558. - run:
  559. name: install requirements and run segmentation sanity tests
  560. command: |
  561. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  562. source << parameters.sg_new_env_name >>/bin/activate
  563. python3.8 -m pip install --upgrade setuptools pip wheel
  564. python3.8 -m pip install -r requirements.txt
  565. python3.8 -m pip install .
  566. python3.8 -m pip install torch torchvision torchaudio
  567. 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
  568. wget -O $(pwd)/checkpoints/ddrnet23_bb_imagenet.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_bb_imagenet.pth
  569. wget -O $(pwd)/checkpoints/ddrnet39_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet39_bb_imagenet.pth
  570. python3.8 src/super_gradients/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
  571. python3.8 src/super_gradients/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
  572. python3.8 src/super_gradients/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
  573. wget -O $(pwd)/checkpoints/stdc1_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc1_imagenet_pretrained.pth
  574. wget -O $(pwd)/checkpoints/stdc2_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc2_imagenet_pretrained.pth
  575. python3.8 src/super_gradients/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
  576. python3.8 src/super_gradients/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
  577. python3.8 src/super_gradients/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
  578. python3.8 src/super_gradients/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
  579. python3.8 src/super_gradients/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
  580. python3.8 src/super_gradients/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
  581. python3.8 src/super_gradients/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
  582. python3.8 src/super_gradients/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
  583. - run:
  584. name: Remove new environment when failed
  585. command: "rm -r << parameters.sg_new_env_name >>"
  586. when: on_fail
  587. - slack/notify:
  588. channel: "sg-integration-tests"
  589. event: fail
  590. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  591. recipe_sanity_tests_detection:
  592. docker:
  593. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  594. resource_class: deci-ai/sg-gpu-on-premise
  595. parameters:
  596. sg_existing_env_path:
  597. type: string
  598. default: "/env/persistent_env"
  599. sg_new_env_name:
  600. type: string
  601. default: "${CIRCLE_BUILD_NUM}"
  602. sg_new_env_python_version:
  603. type: string
  604. default: "python3.8"
  605. steps:
  606. - checkout
  607. - run:
  608. name: install requirements and run detection sanity tests
  609. command: |
  610. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  611. source << parameters.sg_new_env_name >>/bin/activate
  612. python3.8 -m pip install --upgrade setuptools pip wheel
  613. python3.8 -m pip install -r requirements.txt
  614. python3.8 -m pip install .
  615. python3.8 -m pip install torch torchvision torchaudio
  616. python3.8 src/super_gradients/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
  617. python3.8 src/super_gradients/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
  618. python3.8 src/super_gradients/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
  619. python3.8 src/super_gradients/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
  620. python3.8 src/super_gradients/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
  621. python3.8 src/super_gradients/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
  622. - run:
  623. name: Remove new environment when failed
  624. command: "rm -r << parameters.sg_new_env_name >>"
  625. when: on_fail
  626. - slack/notify:
  627. channel: "sg-integration-tests"
  628. event: fail
  629. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  630. recipe_sanity_tests_pose_estimation:
  631. docker:
  632. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  633. resource_class: deci-ai/sg-gpu-on-premise
  634. parameters:
  635. sg_existing_env_path:
  636. type: string
  637. default: "/env/persistent_env"
  638. sg_new_env_name:
  639. type: string
  640. default: "${CIRCLE_BUILD_NUM}"
  641. sg_new_env_python_version:
  642. type: string
  643. default: "python3.8"
  644. steps:
  645. - checkout
  646. - run:
  647. name: install requirements and run pose estimation sanity tests
  648. command: |
  649. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  650. source << parameters.sg_new_env_name >>/bin/activate
  651. python3.8 -m pip install --upgrade setuptools pip wheel
  652. python3.8 -m pip install -r requirements.txt
  653. python3.8 -m pip install .
  654. python3.8 -m pip install torch torchvision torchaudio
  655. python3.8 src/super_gradients/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
  656. - run:
  657. name: Remove new environment when failed
  658. command: "rm -r << parameters.sg_new_env_name >>"
  659. when: on_fail
  660. - slack/notify:
  661. channel: "sg-integration-tests"
  662. event: fail
  663. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  664. docker-build-and-publish-branch:
  665. docker:
  666. - image: cimg/base:stable-20.04
  667. parameters:
  668. repo_name:
  669. type: string
  670. default: "deci/super-gradients"
  671. docker_context:
  672. type: string
  673. default: "."
  674. additional_tags:
  675. type: string
  676. default: ''
  677. steps:
  678. - setup_remote_docker:
  679. version: 20.10.7
  680. docker_layer_caching: true
  681. - deci-common/container_image_lint_tag:
  682. image_tag: "${CIRCLE_BRANCH}"
  683. - run:
  684. command: |
  685. ADDITIONAL_TAGS="<< parameters.additional_tags >>"
  686. echo "export ADDITIONAL_TAGS=${ADDITIONAL_TAGS}" >> $BASH_ENV
  687. - run:
  688. command: |
  689. source $BASH_ENV
  690. echo "$CONTAINER_LINT_TAG"
  691. echo "$ADDITIONAL_TAGS"
  692. - when:
  693. condition: << pipeline.parameters.ad_hoc_container_build_code_only >>
  694. steps:
  695. - build_and_publish_command:
  696. repo_name: << parameters.repo_name >>
  697. docker_context: << parameters.docker_context >>
  698. image_tag: $CONTAINER_LINT_TAG
  699. additional_tags: $ADDITIONAL_TAGS
  700. dockerfile: 'scripts/Dockerfile.branch.code'
  701. build_args: "BASE_TAG=$CONTAINER_LINT_TAG"
  702. - unless:
  703. condition: << pipeline.parameters.ad_hoc_container_build_code_only >>
  704. steps:
  705. - build_and_publish_command:
  706. repo_name: << parameters.repo_name >>
  707. docker_context: << parameters.docker_context >>
  708. image_tag: $CONTAINER_LINT_TAG
  709. additional_tags: $ADDITIONAL_TAGS
  710. dockerfile: 'scripts/Dockerfile.branch'
  711. workflows:
  712. sanity_tests:
  713. when: << pipeline.parameters.run_sanity_tests_flow >>
  714. jobs:
  715. - recipe_sanity_tests_classification_pt1:
  716. context:
  717. - slack
  718. - recipe_sanity_tests_classification_pt2:
  719. context:
  720. - slack
  721. - recipe_sanity_tests_segmentation:
  722. context:
  723. - slack
  724. - recipe_sanity_tests_detection:
  725. context:
  726. - slack
  727. - recipe_sanity_tests_pose_estimation:
  728. context:
  729. - slack
  730. - recipe_accuracy_tests:
  731. context:
  732. - slack
  733. release:
  734. unless:
  735. or:
  736. - << pipeline.parameters.ad_hoc_container_build >>
  737. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  738. jobs:
  739. - deci-common/persist_version_info:
  740. version_override: $CIRCLE_TAG
  741. <<: *release_tag_filter
  742. - deci-common/codeartifact_login:
  743. name: "login_to_codeartifact_release"
  744. repo_name: "deci-packages"
  745. <<: *release_tag_filter
  746. - build:
  747. name: "build3.8"
  748. py_version: "3.8"
  749. package_name: "super-gradients"
  750. requires:
  751. - deci-common/persist_version_info
  752. - login_to_codeartifact_release
  753. <<: *release_tag_filter
  754. - recipe_sanity_tests_classification_pt1:
  755. context:
  756. - slack
  757. <<: *release_tag_filter
  758. - recipe_sanity_tests_classification_pt2:
  759. context:
  760. - slack
  761. <<: *release_tag_filter
  762. - recipe_sanity_tests_segmentation:
  763. context:
  764. - slack
  765. <<: *release_tag_filter
  766. - recipe_sanity_tests_detection:
  767. context:
  768. - slack
  769. <<: *release_tag_filter
  770. - recipe_sanity_tests_pose_estimation:
  771. context:
  772. - slack
  773. <<: *release_tag_filter
  774. - recipe_accuracy_tests:
  775. context:
  776. - slack
  777. <<: *release_tag_filter
  778. - release_version:
  779. py_version: "3.8"
  780. requires:
  781. - "build3.8"
  782. - recipe_accuracy_tests
  783. - recipe_sanity_tests_classification_pt1
  784. - recipe_sanity_tests_classification_pt2
  785. - recipe_sanity_tests_segmentation
  786. - recipe_sanity_tests_detection
  787. - recipe_sanity_tests_pose_estimation
  788. <<: *release_tag_filter
  789. - deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
  790. package_name: "super-gradients"
  791. name: "upload_super_gradients_to_pypi"
  792. version: $CIRCLE_TAG
  793. requires:
  794. - "release_version"
  795. context:
  796. - pypi-supergradients
  797. <<: *release_tag_filter
  798. build_and_deploy:
  799. unless:
  800. or:
  801. - << pipeline.parameters.ad_hoc_container_build >>
  802. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  803. jobs:
  804. - deci-common/persist_version_info:
  805. use_rc: true
  806. use_beta: false
  807. version_override: ""
  808. - build:
  809. name: "build<< pipeline.parameters.build_py_version >>"
  810. py_version: << pipeline.parameters.build_py_version >>
  811. package_name: "super-gradients"
  812. requires:
  813. - deci-common/persist_version_info
  814. - deci-common/codeartifact_login:
  815. repo_name: "deci-packages"
  816. <<: *release_candidate_filter
  817. - release_candidate: # happens on merge
  818. py_version: "<< pipeline.parameters.build_py_version >>"
  819. requires:
  820. - "build<< pipeline.parameters.build_py_version >>"
  821. - deci-common/codeartifact_login
  822. <<: *release_candidate_filter
  823. SG_docker:
  824. unless:
  825. or:
  826. - << pipeline.parameters.ad_hoc_container_build >>
  827. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  828. jobs:
  829. - change_rc_to_b: # works on release candidate creation
  830. <<: *release_candidate_tag_filter
  831. - build_and_publish_sg_container: # works on release candidate creation
  832. requires:
  833. - "change_rc_to_b"
  834. <<: *release_candidate_tag_filter
  835. - testing_supergradients_docker_image: # works on release candidate creation
  836. image_repo: '307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/super-gradients'
  837. requires:
  838. - "build_and_publish_sg_container"
  839. - "change_rc_to_b"
  840. <<: *release_candidate_tag_filter
  841. - add_rc_tag_to_beta: # works on release candidate creation for ECR Repo
  842. requires:
  843. - "testing_supergradients_docker_image"
  844. - "change_rc_to_b"
  845. <<: *release_candidate_tag_filter
  846. - find_rc_tag_per_sha: # works on release
  847. <<: *release_tag_filter
  848. - add_release_tag_to_rc: # works on release
  849. requires:
  850. - "find_rc_tag_per_sha"
  851. <<: *release_tag_filter
  852. - slack/on-hold:
  853. context: slack
  854. channel: "sg-integration-tests"
  855. requires:
  856. - "add_release_tag_to_rc"
  857. <<: *release_tag_filter
  858. - hold-sg-public-release: # works on release
  859. type: approval
  860. requires:
  861. - "slack/on-hold"
  862. <<: *release_tag_filter
  863. - docker/publish: # works on release
  864. executor:
  865. image: cimg/base
  866. tag: stable-20.04
  867. name: docker/docker
  868. image: deciai/super-gradients
  869. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  870. update-description: true
  871. use-buildkit: true
  872. use-remote-docker: true
  873. use-docker-credentials-store: true
  874. path: ./scripts
  875. readme: ../README.md
  876. tag: latest,${CIRCLE_TAG}
  877. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG}' #building from scratch as it faster and cheaper than download and retag
  878. requires:
  879. - "hold-sg-public-release"
  880. <<: *release_tag_filter
  881. - docker/publish: # works on release
  882. executor:
  883. image: cimg/base
  884. tag: stable-20.04
  885. name: docker/docker
  886. image: deciai/super-gradients
  887. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  888. update-description: false
  889. use-buildkit: true
  890. use-remote-docker: true
  891. use-docker-credentials-store: true
  892. path: ./scripts
  893. tag: ${CIRCLE_TAG}-runtime
  894. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG} --build-arg DOCKER_IMAGE_TAG=11.3.1-runtime-ubuntu20.04'
  895. requires:
  896. - "hold-sg-public-release"
  897. <<: *release_tag_filter
  898. build-and-push-container-flow:
  899. when: << pipeline.parameters.ad_hoc_container_build >>
  900. jobs:
  901. - docker-build-and-publish-branch
  902. build-and-push-container-code-only-flow:
  903. when: << pipeline.parameters.ad_hoc_container_build_code_only >>
  904. jobs:
  905. - docker-build-and-publish-branch
Tip!

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

Comments

Loading...