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

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

Comments

Loading...