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

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

Comments

Loading...