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 48 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
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
  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 branch and other branches that start with "master"
  49. only: /^master.*/
  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. breaking_change_check:
  211. parameters:
  212. py_version:
  213. type: string
  214. default: latest
  215. docker:
  216. - image: cimg/python:<< parameters.py_version >>
  217. resource_class: small
  218. steps:
  219. - checkout
  220. - run:
  221. name: Detect breaking changes
  222. no_output_timeout: 30m
  223. command: |
  224. python3 -m venv venv
  225. . venv/bin/activate
  226. python3 -m pip install pip==23.1.2
  227. python3 -m pip install -e .
  228. python3 -m pip install gitpython==3.1.0
  229. coverage run --source=super_gradients -m unittest tests/breaking_change_tests/unit_test.py
  230. coverage run --source=super_gradients -m unittest tests/breaking_change_tests/test_detect_breaking_change.py
  231. - run:
  232. name: Remove new environment when failed
  233. command: "rm -r venv"
  234. when: on_fail
  235. - slack/notify:
  236. channel: "sg-integration-tests"
  237. event: fail
  238. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  239. change_rc_to_b:
  240. description: "change rc in the tag to b"
  241. docker:
  242. - image: cimg/base:stable-20.04
  243. resource_class: small
  244. steps:
  245. - run:
  246. name: change the rc to b
  247. command:
  248. |
  249. BETA_TAG=$(echo ${CIRCLE_TAG} | sed -e 's|rc|b|'); echo ${BETA_TAG} >> ~/BETA_TAG
  250. cat ~/BETA_TAG
  251. - persist_to_workspace:
  252. root: ~/
  253. paths:
  254. - "BETA_TAG"
  255. build_and_publish_sg_container:
  256. description : "building the temp image and pushing to dev ecr"
  257. parameters:
  258. repo_name:
  259. type: string
  260. default: 'deci/super-gradients'
  261. sg_python_version:
  262. type: string
  263. default: $CIRCLE_TAG
  264. docker:
  265. - image: cimg/base:stable-20.04
  266. resource_class: small
  267. steps:
  268. - checkout
  269. - get_beta_and_rc_tags
  270. - run:
  271. command: echo *$BETA_TAG*
  272. - setup_remote_docker:
  273. version: << pipeline.parameters.remote_docker_version >>
  274. docker_layer_caching: true
  275. - deci-common/container_image_build:
  276. dockerfile: scripts/Dockerfile
  277. repository_name: << parameters.repo_name >>
  278. image_tag: "$BETA_TAG"
  279. build_args: 'SG_VERSION=<< parameters.sg_python_version >>'
  280. extra_flags: ' --compress'
  281. - deci-common/push_docker_image_aws_dev:
  282. repository_name: << parameters.repo_name >>
  283. image_tag: "$BETA_TAG"
  284. additional_tags: "latest"
  285. find_rc_tag_per_sha:
  286. description: this command will take the sha of the last commit and find the rc tag it belongs to as ${RC_TAG} variale
  287. docker:
  288. - image: cimg/aws:2022.11.1
  289. resource_class: small
  290. steps:
  291. - checkout
  292. - run:
  293. name: get rc tag of the final tag
  294. command: |
  295. if [[ $(RC_TAG=$(git tag --contains ${CIRCLE_SHA1} | grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+rc[[:digit:]]+' | head -n 1)) ]] ; then
  296. echo "Found RC version: ${RC_TAG}"
  297. echo $RC_TAG >> ~/RC_TAG
  298. else
  299. echo "No Rc Tag found for commit"
  300. circleci-agent step halt
  301. fi
  302. - persist_to_workspace:
  303. root: ~/
  304. paths:
  305. - "RC_TAG"
  306. add_rc_tag_to_beta:
  307. description: in the event of successful test promote beta to rc
  308. parameters:
  309. image_repo:
  310. type: string
  311. default: "deci/super-gradients"
  312. docker:
  313. - image: cimg/base:stable-20.04
  314. resource_class: small
  315. steps:
  316. - get_beta_and_rc_tags
  317. - run:
  318. command: |
  319. echo $BETA_TAG
  320. - adding_tag_to_ecr_container_image:
  321. image_repo: << parameters.image_repo >>
  322. source_image_tag: $BETA_TAG
  323. new_image_tag: $CIRCLE_TAG
  324. add_release_tag_to_rc:
  325. description: in the event of successful test promote rc to release and latest
  326. parameters:
  327. image_repo:
  328. type: string
  329. default: "deci/super-gradients"
  330. docker:
  331. - image: cimg/base:stable-20.04
  332. resource_class: small
  333. steps:
  334. - get_beta_and_rc_tags
  335. - run:
  336. command: |
  337. if [ -z $RC_TAG ] ; then
  338. circleci-agent step halt
  339. else
  340. echo $RC_TAG
  341. fi
  342. - adding_tag_to_ecr_container_image:
  343. image_repo: << parameters.image_repo >>
  344. source_image_tag: $RC_TAG
  345. new_image_tag: ${CIRCLE_TAG}
  346. testing_supergradients_docker_image:
  347. description: "running integration test on the code"
  348. parameters:
  349. image_repo:
  350. type: string
  351. #reserved for testing when will be done
  352. #machine: true
  353. #resource_class: deci-ai/research-standard
  354. docker:
  355. - image: cimg/base:stable-20.04
  356. steps:
  357. - deci-common/ecr_login_dev
  358. - get_beta_and_rc_tags
  359. # - run:
  360. # name: integration test
  361. # #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
  362. # 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!")'
  363. - run:
  364. command: echo Hello world
  365. release_candidate:
  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. docker:
  372. - image: cimg/python:<< parameters.py_version >>
  373. steps:
  374. - deci-common/checkout_and_skip_build:
  375. check_version_file: true
  376. skip_md_files: true
  377. - deci-common/get_persisted_version_info
  378. - run:
  379. name: edit package version
  380. command: |
  381. echo $NEW_VERSION > version.txt
  382. - deci-common/pip_upload_package_codeartifact_dev:
  383. codeartifact_repository: "deci-packages"
  384. - deci-common/pip_test_package_installation_codeartifact_dev:
  385. package_name: "super-gradients"
  386. version: $NEW_VERSION
  387. - deci-common/git_config_automation_user
  388. - run:
  389. name: "commit version file"
  390. command: |
  391. git commit version.txt -m "Deci Services - Changed version to $NEW_VERSION"
  392. - deci-common/git_commit_and_tag:
  393. version: $NEW_VERSION
  394. release_version:
  395. environment:
  396. CIRCLE_COMPARE_URL: << pipeline.project.git_url >>/compare/<< pipeline.git.base_revision >>..<<pipeline.git.revision>>
  397. parameters:
  398. py_version:
  399. type: string
  400. dev_venv_name:
  401. type: string
  402. default: "dev-sg-${CIRCLE_BUILD_NUM}"
  403. docker:
  404. - image: cimg/python:<< parameters.py_version >>
  405. steps:
  406. - deci-common/checkout_and_skip_build:
  407. check_version_file: true
  408. skip_md_files: false
  409. - run:
  410. name: add requirements.txt and requirements.pro.txt to source code
  411. command: |
  412. cp requirements.txt src/super_gradients/requirements.txt
  413. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  414. - run:
  415. name: edit package version
  416. command: |
  417. echo $CIRCLE_TAG > version.txt
  418. - deci-common/pip_upload_package_codeartifact_all_accounts:
  419. codeartifact_repository: "deci-packages"
  420. - deci-common/pip_test_package_installation_codeartifact_dev:
  421. package_name: "super-gradients"
  422. version: $CIRCLE_TAG
  423. venv_name: << parameters.dev_venv_name >>
  424. - run:
  425. name: verify that the output of __version__ is what we expect
  426. command: |
  427. . << parameters.dev_venv_name >>-super-gradients-$CIRCLE_TAG/bin/activate
  428. python3 tests/verify_version.py $CIRCLE_TAG
  429. - deci-common/pip_test_package_installation_codeartifact_prod:
  430. package_name: "super-gradients"
  431. version: $CIRCLE_TAG
  432. - deci-common/pip_upload_package_codeartifact_prod:
  433. codeartifact_repository: "deci-toolkit"
  434. - deci-common/git_commit_and_tag:
  435. version: $CIRCLE_TAG
  436. delete_remote_tag_before_tagging: true
  437. - deci-common/tag_as:
  438. tag_name: "stable"
  439. delete_remote: true
  440. - deci-common/github_create_release:
  441. github_cli_token: $GITHUB_CLI_TOKEN
  442. directory_to_cd_into: "."
  443. tag: $CIRCLE_TAG
  444. notes: "This GitHub Release was done automatically by CircleCI"
  445. hydra_sweeper_test:
  446. docker:
  447. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  448. resource_class: deci-ai/sg-gpu-on-premise
  449. parameters:
  450. sg_existing_env_path:
  451. type: string
  452. default: "/env/persistent_env"
  453. sg_new_env_name:
  454. type: string
  455. default: "${CIRCLE_BUILD_NUM}"
  456. sg_new_env_python_version:
  457. type: string
  458. default: "python3.8"
  459. steps:
  460. - checkout
  461. - run:
  462. name: install requirements and run recipe tests
  463. command: |
  464. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  465. source << parameters.sg_new_env_name >>/bin/activate
  466. python3.8 -m pip install --upgrade setuptools pip wheel
  467. python3.8 -m pip install -r requirements.txt
  468. python3.8 -m pip install .
  469. python3.8 -m pip install torch torchvision torchaudio
  470. make sweeper_test
  471. - run:
  472. name: Remove new environment when failed
  473. command: "rm -r << parameters.sg_new_env_name >>"
  474. when: on_fail
  475. - slack/notify:
  476. channel: "sg-integration-tests"
  477. event: fail
  478. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  479. recipe_accuracy_tests:
  480. docker:
  481. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  482. resource_class: deci-ai/sg-gpu-on-premise
  483. parameters:
  484. sg_existing_env_path:
  485. type: string
  486. default: "/env/persistent_env"
  487. sg_new_env_name:
  488. type: string
  489. default: "${CIRCLE_BUILD_NUM}"
  490. sg_new_env_python_version:
  491. type: string
  492. default: "python3.8"
  493. steps:
  494. - checkout
  495. - run:
  496. name: install requirements and run recipe tests
  497. command: |
  498. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  499. source << parameters.sg_new_env_name >>/bin/activate
  500. python3.8 -m pip install --upgrade setuptools pip wheel
  501. python3.8 -m pip install -r requirements.txt
  502. python3.8 -m pip install .
  503. python3.8 -m pip install torch torchvision torchaudio
  504. python3.8 -m pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidia.com
  505. python3.8 tests/verify_min_samples_ddp.py
  506. 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
  507. 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
  508. 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
  509. 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
  510. 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
  511. coverage run --source=super_gradients -m unittest tests/deci_core_recipe_test_suite_runner.py
  512. - run:
  513. name: Remove new environment when failed
  514. command: "rm -r << parameters.sg_new_env_name >>"
  515. when: on_fail
  516. - slack/notify:
  517. channel: "sg-integration-tests"
  518. event: fail
  519. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  520. recipe_sanity_tests_classification_pt1:
  521. docker:
  522. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  523. resource_class: deci-ai/sg-gpu-on-premise
  524. parameters:
  525. sg_existing_env_path:
  526. type: string
  527. default: "/env/persistent_env"
  528. sg_new_env_name:
  529. type: string
  530. default: "${CIRCLE_BUILD_NUM}"
  531. sg_new_env_python_version:
  532. type: string
  533. default: "python3.8"
  534. steps:
  535. - checkout
  536. - run:
  537. name: install requirements and run classification sanity tests
  538. command: |
  539. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  540. source << parameters.sg_new_env_name >>/bin/activate
  541. ls /data/
  542. python3.8 -m pip install --upgrade setuptools pip wheel
  543. python3.8 -m pip install -r requirements.txt
  544. python3.8 -m pip install .
  545. python3.8 -m pip install torch torchvision torchaudio
  546. 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
  547. 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
  548. 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
  549. 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
  550. 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
  551. 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
  552. - run:
  553. name: Remove new environment when failed
  554. command: "rm -r << parameters.sg_new_env_name >>"
  555. when: on_fail
  556. - slack/notify:
  557. channel: "sg-integration-tests"
  558. event: fail
  559. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  560. recipe_sanity_tests_classification_pt2:
  561. docker:
  562. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  563. resource_class: deci-ai/sg-gpu-on-premise
  564. parameters:
  565. sg_existing_env_path:
  566. type: string
  567. default: "/env/persistent_env"
  568. sg_new_env_name:
  569. type: string
  570. default: "${CIRCLE_BUILD_NUM}"
  571. sg_new_env_python_version:
  572. type: string
  573. default: "python3.8"
  574. steps:
  575. - checkout
  576. - run:
  577. name: install requirements and run classification sanity tests
  578. command: |
  579. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  580. source << parameters.sg_new_env_name >>/bin/activate
  581. python3.8 -m pip install --upgrade setuptools pip wheel
  582. python3.8 -m pip install -r requirements.txt
  583. python3.8 -m pip install .
  584. python3.8 -m pip install torch torchvision torchaudio
  585. 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
  586. 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
  587. 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
  588. 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
  589. 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
  590. 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
  591. - run:
  592. name: Remove new environment when failed
  593. command: "rm -r << parameters.sg_new_env_name >>"
  594. when: on_fail
  595. - slack/notify:
  596. channel: "sg-integration-tests"
  597. event: fail
  598. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  599. recipe_sanity_tests_segmentation:
  600. docker:
  601. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  602. resource_class: deci-ai/sg-gpu-on-premise
  603. parameters:
  604. sg_existing_env_path:
  605. type: string
  606. default: "/env/persistent_env"
  607. sg_new_env_name:
  608. type: string
  609. default: "${CIRCLE_BUILD_NUM}"
  610. sg_new_env_python_version:
  611. type: string
  612. default: "python3.8"
  613. steps:
  614. - checkout
  615. - run:
  616. name: install requirements and run segmentation sanity tests
  617. command: |
  618. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  619. source << parameters.sg_new_env_name >>/bin/activate
  620. python3.8 -m pip install --upgrade setuptools pip wheel
  621. python3.8 -m pip install -r requirements.txt
  622. python3.8 -m pip install .
  623. python3.8 -m pip install torch torchvision torchaudio
  624. 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
  625. wget -O $(pwd)/checkpoints/ddrnet23_bb_imagenet.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_bb_imagenet.pth
  626. wget -O $(pwd)/checkpoints/ddrnet39_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet39_bb_imagenet.pth
  627. 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
  628. 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
  629. 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
  630. wget -O $(pwd)/checkpoints/stdc1_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc1_imagenet_pretrained.pth
  631. wget -O $(pwd)/checkpoints/stdc2_imagenet_pretrained.pth https://deci-pretrained-models.s3.amazonaws.com/stdc_backbones/stdc2_imagenet_pretrained.pth
  632. 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
  633. 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
  634. 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
  635. 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
  636. 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
  637. 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
  638. 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
  639. 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
  640. - run:
  641. name: Remove new environment when failed
  642. command: "rm -r << parameters.sg_new_env_name >>"
  643. when: on_fail
  644. - slack/notify:
  645. channel: "sg-integration-tests"
  646. event: fail
  647. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  648. recipe_sanity_tests_detection:
  649. docker:
  650. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  651. resource_class: deci-ai/sg-gpu-on-premise
  652. parameters:
  653. sg_existing_env_path:
  654. type: string
  655. default: "/env/persistent_env"
  656. sg_new_env_name:
  657. type: string
  658. default: "${CIRCLE_BUILD_NUM}"
  659. sg_new_env_python_version:
  660. type: string
  661. default: "python3.8"
  662. steps:
  663. - checkout
  664. - run:
  665. name: install requirements and run detection sanity tests
  666. command: |
  667. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  668. source << parameters.sg_new_env_name >>/bin/activate
  669. python3.8 -m pip install --upgrade setuptools pip wheel
  670. python3.8 -m pip install -r requirements.txt
  671. python3.8 -m pip install .
  672. python3.8 -m pip install torch torchvision torchaudio
  673. 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
  674. 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
  675. 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
  676. 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
  677. 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
  678. 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
  679. - run:
  680. name: Remove new environment when failed
  681. command: "rm -r << parameters.sg_new_env_name >>"
  682. when: on_fail
  683. - slack/notify:
  684. channel: "sg-integration-tests"
  685. event: fail
  686. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  687. recipe_sanity_tests_pose_estimation:
  688. docker:
  689. - image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
  690. resource_class: deci-ai/sg-gpu-on-premise
  691. parameters:
  692. sg_existing_env_path:
  693. type: string
  694. default: "/env/persistent_env"
  695. sg_new_env_name:
  696. type: string
  697. default: "${CIRCLE_BUILD_NUM}"
  698. sg_new_env_python_version:
  699. type: string
  700. default: "python3.8"
  701. steps:
  702. - checkout
  703. - run:
  704. name: install requirements and run pose estimation sanity tests
  705. command: |
  706. << parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
  707. source << parameters.sg_new_env_name >>/bin/activate
  708. python3.8 -m pip install --upgrade setuptools pip wheel
  709. python3.8 -m pip install -r requirements.txt
  710. python3.8 -m pip install .
  711. python3.8 -m pip install torch torchvision torchaudio
  712. 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
  713. - run:
  714. name: Remove new environment when failed
  715. command: "rm -r << parameters.sg_new_env_name >>"
  716. when: on_fail
  717. - slack/notify:
  718. channel: "sg-integration-tests"
  719. event: fail
  720. template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.
  721. docker-build-and-publish-branch:
  722. docker:
  723. - image: cimg/base:stable-20.04
  724. parameters:
  725. repo_name:
  726. type: string
  727. default: "deci/super-gradients"
  728. docker_context:
  729. type: string
  730. default: "."
  731. additional_tags:
  732. type: string
  733. default: ''
  734. steps:
  735. - setup_remote_docker:
  736. version: 20.10.7
  737. docker_layer_caching: true
  738. - deci-common/container_image_lint_tag:
  739. image_tag: "${CIRCLE_BRANCH}"
  740. - run:
  741. command: |
  742. ADDITIONAL_TAGS="<< parameters.additional_tags >>"
  743. echo "export ADDITIONAL_TAGS=${ADDITIONAL_TAGS}" >> $BASH_ENV
  744. - run:
  745. command: |
  746. source $BASH_ENV
  747. echo "$CONTAINER_LINT_TAG"
  748. echo "$ADDITIONAL_TAGS"
  749. - when:
  750. condition: << pipeline.parameters.ad_hoc_container_build_code_only >>
  751. steps:
  752. - build_and_publish_command:
  753. repo_name: << parameters.repo_name >>
  754. docker_context: << parameters.docker_context >>
  755. image_tag: $CONTAINER_LINT_TAG
  756. additional_tags: $ADDITIONAL_TAGS
  757. dockerfile: 'scripts/Dockerfile.branch.code'
  758. build_args: "BASE_TAG=$CONTAINER_LINT_TAG"
  759. - unless:
  760. condition: << pipeline.parameters.ad_hoc_container_build_code_only >>
  761. steps:
  762. - build_and_publish_command:
  763. repo_name: << parameters.repo_name >>
  764. docker_context: << parameters.docker_context >>
  765. image_tag: $CONTAINER_LINT_TAG
  766. additional_tags: $ADDITIONAL_TAGS
  767. dockerfile: 'scripts/Dockerfile.branch'
  768. workflows:
  769. sanity_tests:
  770. when: << pipeline.parameters.run_sanity_tests_flow >>
  771. jobs:
  772. - hydra_sweeper_test:
  773. context:
  774. - slack
  775. - recipe_sanity_tests_classification_pt1:
  776. context:
  777. - slack
  778. - recipe_sanity_tests_classification_pt2:
  779. context:
  780. - slack
  781. - recipe_sanity_tests_segmentation:
  782. context:
  783. - slack
  784. - recipe_sanity_tests_detection:
  785. context:
  786. - slack
  787. - recipe_sanity_tests_pose_estimation:
  788. context:
  789. - slack
  790. - recipe_accuracy_tests:
  791. context:
  792. - slack
  793. release:
  794. unless:
  795. or:
  796. - << pipeline.parameters.ad_hoc_container_build >>
  797. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  798. jobs:
  799. - deci-common/persist_version_info:
  800. version_override: $CIRCLE_TAG
  801. <<: *release_tag_filter
  802. - deci-common/codeartifact_login:
  803. name: "login_to_codeartifact_release"
  804. repo_name: "deci-packages"
  805. <<: *release_tag_filter
  806. - build:
  807. name: "build3.8"
  808. py_version: "3.8"
  809. package_name: "super-gradients"
  810. requires:
  811. - deci-common/persist_version_info
  812. - login_to_codeartifact_release
  813. <<: *release_tag_filter
  814. - hydra_sweeper_test:
  815. context:
  816. - slack
  817. <<: *release_tag_filter
  818. - recipe_sanity_tests_classification_pt1:
  819. context:
  820. - slack
  821. <<: *release_tag_filter
  822. - recipe_sanity_tests_classification_pt2:
  823. context:
  824. - slack
  825. <<: *release_tag_filter
  826. - recipe_sanity_tests_segmentation:
  827. context:
  828. - slack
  829. <<: *release_tag_filter
  830. - recipe_sanity_tests_detection:
  831. context:
  832. - slack
  833. <<: *release_tag_filter
  834. - recipe_sanity_tests_pose_estimation:
  835. context:
  836. - slack
  837. <<: *release_tag_filter
  838. - recipe_accuracy_tests:
  839. context:
  840. - slack
  841. <<: *release_tag_filter
  842. - release_version:
  843. py_version: "3.8"
  844. requires:
  845. - "build3.8"
  846. - hydra_sweeper_test
  847. - recipe_accuracy_tests
  848. - recipe_sanity_tests_classification_pt1
  849. - recipe_sanity_tests_classification_pt2
  850. - recipe_sanity_tests_segmentation
  851. - recipe_sanity_tests_detection
  852. - recipe_sanity_tests_pose_estimation
  853. <<: *release_tag_filter
  854. - deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
  855. package_name: "super-gradients"
  856. name: "upload_super_gradients_to_pypi"
  857. version: $CIRCLE_TAG
  858. requires:
  859. - "release_version"
  860. context:
  861. - pypi-supergradients
  862. <<: *release_tag_filter
  863. build_and_deploy:
  864. unless:
  865. or:
  866. - << pipeline.parameters.ad_hoc_container_build >>
  867. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  868. jobs:
  869. - deci-common/persist_version_info:
  870. use_rc: true
  871. use_beta: false
  872. version_override: ""
  873. - build:
  874. name: "build<< pipeline.parameters.build_py_version >>"
  875. py_version: << pipeline.parameters.build_py_version >>
  876. package_name: "super-gradients"
  877. requires:
  878. - deci-common/persist_version_info
  879. - breaking_change_check:
  880. name: "breaking-change-check"
  881. py_version: << pipeline.parameters.build_py_version >>
  882. requires:
  883. - deci-common/persist_version_info
  884. - deci-common/codeartifact_login:
  885. repo_name: "deci-packages"
  886. <<: *release_candidate_filter
  887. - release_candidate: # happens on merge
  888. py_version: "<< pipeline.parameters.build_py_version >>"
  889. requires:
  890. - "build<< pipeline.parameters.build_py_version >>"
  891. - deci-common/codeartifact_login
  892. <<: *release_candidate_filter
  893. SG_docker:
  894. unless:
  895. or:
  896. - << pipeline.parameters.ad_hoc_container_build >>
  897. - << pipeline.parameters.ad_hoc_container_build_code_only >>
  898. jobs:
  899. - change_rc_to_b: # works on release candidate creation
  900. <<: *release_candidate_tag_filter
  901. - build_and_publish_sg_container: # works on release candidate creation
  902. requires:
  903. - "change_rc_to_b"
  904. <<: *release_candidate_tag_filter
  905. - testing_supergradients_docker_image: # works on release candidate creation
  906. image_repo: '307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/super-gradients'
  907. requires:
  908. - "build_and_publish_sg_container"
  909. - "change_rc_to_b"
  910. <<: *release_candidate_tag_filter
  911. - add_rc_tag_to_beta: # works on release candidate creation for ECR Repo
  912. requires:
  913. - "testing_supergradients_docker_image"
  914. - "change_rc_to_b"
  915. <<: *release_candidate_tag_filter
  916. - find_rc_tag_per_sha: # works on release
  917. <<: *release_tag_filter
  918. - add_release_tag_to_rc: # works on release
  919. requires:
  920. - "find_rc_tag_per_sha"
  921. <<: *release_tag_filter
  922. - slack/on-hold:
  923. context: slack
  924. channel: "sg-integration-tests"
  925. requires:
  926. - "add_release_tag_to_rc"
  927. <<: *release_tag_filter
  928. - hold-sg-public-release: # works on release
  929. type: approval
  930. requires:
  931. - "slack/on-hold"
  932. <<: *release_tag_filter
  933. - docker/publish: # works on release
  934. executor:
  935. image: cimg/base
  936. tag: stable-20.04
  937. name: docker/docker
  938. image: deciai/super-gradients
  939. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  940. update-description: true
  941. use-buildkit: true
  942. use-remote-docker: true
  943. use-docker-credentials-store: true
  944. path: ./scripts
  945. readme: ../README.md
  946. tag: latest,${CIRCLE_TAG}
  947. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG}' #building from scratch as it faster and cheaper than download and retag
  948. requires:
  949. - "hold-sg-public-release"
  950. <<: *release_tag_filter
  951. - docker/publish: # works on release
  952. executor:
  953. image: cimg/base
  954. tag: stable-20.04
  955. name: docker/docker
  956. image: deciai/super-gradients
  957. remote-docker-version: << pipeline.parameters.remote_docker_version >>
  958. update-description: false
  959. use-buildkit: true
  960. use-remote-docker: true
  961. use-docker-credentials-store: true
  962. path: ./scripts
  963. tag: ${CIRCLE_TAG}-runtime
  964. extra_build_args: '--build-arg VERSION=${CIRCLE_TAG} --build-arg DOCKER_IMAGE_TAG=11.3.1-runtime-ubuntu20.04'
  965. requires:
  966. - "hold-sg-public-release"
  967. <<: *release_tag_filter
  968. build-and-push-container-flow:
  969. when: << pipeline.parameters.ad_hoc_container_build >>
  970. jobs:
  971. - docker-build-and-publish-branch
  972. build-and-push-container-code-only-flow:
  973. when: << pipeline.parameters.ad_hoc_container_build_code_only >>
  974. jobs:
  975. - docker-build-and-publish-branch
Tip!

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

Comments

Loading...