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 7.4 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
  1. version: 2.1
  2. parameters:
  3. orb_version:
  4. type: string
  5. description: Deci ai ORB version https://circleci.com/developer/orbs/orb/deci-ai/circleci-common-orb
  6. default: "4.1.3"
  7. # default: "dev:alpha"
  8. orbs:
  9. deci-common: deci-ai/circleci-common-orb@<< pipeline.parameters.orb_version >>
  10. # This filter operates on SemVer2 tags only
  11. release_tag_filter: &release_tag_filter
  12. filters:
  13. branches:
  14. ignore: /.*/
  15. tags:
  16. only: /^\d+\.\d+\.\d+$/
  17. release_candidate_filter: &release_candidate_filter
  18. filters:
  19. branches:
  20. only: master
  21. jobs:
  22. build:
  23. parameters:
  24. py_version:
  25. type: string
  26. default: latest
  27. package_name:
  28. type: string
  29. docker:
  30. - image: cimg/python:<< parameters.py_version >>
  31. resource_class: large
  32. steps:
  33. - deci-common/checkout_and_skip_build:
  34. check_version_file: true
  35. - deci-common/get_persisted_version_info
  36. - when:
  37. condition:
  38. and:
  39. - not:
  40. equal: [ develop, << pipeline.git.branch >> ]
  41. - not:
  42. equal: [ staging, << pipeline.git.branch >> ]
  43. - not:
  44. equal: [ master, << pipeline.git.branch >> ]
  45. steps:
  46. - run:
  47. name: install Black Flake8 python linter
  48. command: |
  49. pip install --user -r requirements.dev.txt
  50. - run:
  51. name: Lint all python files changed since develop branch
  52. command: |
  53. 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/')
  54. - run:
  55. name: Run Black on changed files against master branch
  56. command: |
  57. black --check setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
  58. - run:
  59. name: add requirements.txt and requirements.pro.txt to source code
  60. command: |
  61. cp requirements.txt src/super_gradients/requirements.txt
  62. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  63. - run:
  64. name: install python dependencies
  65. command: |
  66. python3 -m venv venv
  67. . venv/bin/activate
  68. python3 -m pip install pip==22.0.4
  69. cat requirements.txt | cut -f1 -d"#" | grep "^[^--;]" | xargs -n 1 -L 1 pip install --progress-bar off --extra-index-url https://pypi.ngc.nvidia.com
  70. - run:
  71. name: edit package version
  72. command: |
  73. echo "${NEW_VERSION}" > version.txt
  74. cat version.txt
  75. - run:
  76. name: setup custom environment variables
  77. command: |
  78. echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV
  79. - run:
  80. name: install package
  81. no_output_timeout: 30m
  82. command: |
  83. . venv/bin/activate
  84. python3 -m pip install .[pro]
  85. - run:
  86. name: run tests with coverage
  87. no_output_timeout: 30m
  88. command: |
  89. . venv/bin/activate
  90. coverage run --source=super_gradients -m unittest tests/deci_core_unit_test_suite_runner.py
  91. coverage report
  92. coverage html # open htmlcov/index.html in a browser
  93. - store_artifacts:
  94. path: htmlcov
  95. - store_artifacts:
  96. path: ~/sg_logs
  97. release_candidate:
  98. parameters:
  99. py_version:
  100. type: string
  101. docker:
  102. - image: cimg/python:<< parameters.py_version >>
  103. steps:
  104. - deci-common/checkout_and_skip_build:
  105. check_version_file: true
  106. - deci-common/get_persisted_version_info
  107. - run:
  108. name: edit package version
  109. command: |
  110. echo $NEW_VERSION > version.txt
  111. - deci-common/pip_upload_package_codeartifact_dev:
  112. codeartifact_repository: "deci-packages"
  113. - deci-common/pip_test_package_installation_codeartifact_dev:
  114. package_name: "super-gradients"
  115. version: $NEW_VERSION
  116. - deci-common/git_config_automation_user
  117. - run:
  118. name: "commit version file"
  119. command: |
  120. git commit version.txt -m "Deci Services - Changed version to $NEW_VERSION"
  121. - deci-common/git_commit_and_tag:
  122. version: $NEW_VERSION
  123. release_version:
  124. parameters:
  125. py_version:
  126. type: string
  127. docker:
  128. - image: cimg/python:<< parameters.py_version >>
  129. steps:
  130. - deci-common/checkout_and_skip_build:
  131. check_version_file: true
  132. - run:
  133. name: add requirements.txt and requirements.pro.txt to source code
  134. command: |
  135. cp requirements.txt src/super_gradients/requirements.txt
  136. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  137. - run:
  138. name: edit package version
  139. command: |
  140. echo $CIRCLE_TAG > version.txt
  141. - deci-common/pip_upload_package_codeartifact_all_accounts:
  142. codeartifact_repository: "deci-packages"
  143. - deci-common/pip_test_package_installation_codeartifact_dev:
  144. package_name: "super-gradients"
  145. version: $CIRCLE_TAG
  146. - deci-common/pip_test_package_installation_codeartifact_prod:
  147. package_name: "super-gradients"
  148. version: $CIRCLE_TAG
  149. - deci-common/pip_upload_package_codeartifact_prod:
  150. codeartifact_repository: "deci-toolkit"
  151. - deci-common/git_commit_and_tag:
  152. version: $CIRCLE_TAG
  153. delete_remote_tag_before_tagging: true
  154. - deci-common/tag_as:
  155. tag_name: "stable"
  156. delete_remote: true
  157. - deci-common/github_create_release:
  158. github_cli_token: $GITHUB_CLI_TOKEN
  159. directory_to_cd_into: "."
  160. tag: $CIRCLE_TAG
  161. notes: "This GitHub Release was done automatically by CircleCI"
  162. workflows:
  163. release:
  164. jobs:
  165. - deci-common/persist_version_info:
  166. <<: *release_tag_filter
  167. - deci-common/codeartifact_login:
  168. name: "login_to_codeartifact_release"
  169. repo_name: "deci-packages"
  170. <<: *release_tag_filter
  171. - build:
  172. name: "build3.7"
  173. py_version: "3.7"
  174. package_name: "super-gradients"
  175. requires:
  176. - deci-common/persist_version_info
  177. - login_to_codeartifact_release
  178. <<: *release_tag_filter
  179. - release_version:
  180. py_version: "3.7"
  181. requires:
  182. - "build3.7"
  183. <<: *release_tag_filter
  184. - deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
  185. package_name: "super-gradients"
  186. name: "upload_super_gradients_to_pypi"
  187. version: $CIRCLE_TAG
  188. requires:
  189. - "release_version"
  190. context:
  191. - pypi-public
  192. <<: *release_tag_filter
  193. build_and_deploy:
  194. jobs:
  195. - deci-common/persist_version_info:
  196. branch: << pipeline.git.branch >>
  197. - deci-common/codeartifact_login:
  198. repo_name: "deci-packages"
  199. - build:
  200. name: "build3.7"
  201. py_version: "3.7"
  202. package_name: "super-gradients"
  203. requires:
  204. - deci-common/persist_version_info
  205. - deci-common/codeartifact_login
  206. - release_candidate: # happens on merge
  207. py_version: "3.7"
  208. requires:
  209. - "build3.7"
  210. <<: *release_candidate_filter
Tip!

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

Comments

Loading...