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

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

Comments

Loading...