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

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

Comments

Loading...