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

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

Comments

Loading...