├── .gitignore ├── Data Bricks HOL - Presentation.pptx ├── LICENSE ├── Project_One-Tests ├── __init__.py ├── dockerfile.base ├── runtests.sh ├── runtests_local.cmd ├── runtests_pipeline.sh ├── test_ml_metrics.py └── test_model.py ├── Project_One ├── __init__.py ├── build.py ├── dockerfile.base ├── inference_code │ ├── __init__.py │ ├── model_class.py │ └── utility.py ├── notebooks │ ├── submit_run_db.py │ └── train_model.py ├── requirements.txt ├── run_build_local.cmd ├── runbuild_pipeline.sh └── score.py ├── README.md └── readme_images ├── PR_options_form.png ├── acccess_control_pane_adls_gen2.png ├── adb_cluster_creation_form.png ├── adb_create_folder.png ├── adb_create_notebook.png ├── adb_create_secret_scope.png ├── adb_creation_form.png ├── adb_git_link_settings_form.png ├── adb_token_life.png ├── adb_user_settings.png ├── add_adb.png ├── add_ado_user_1.png ├── add_ado_user_2.png ├── add_azml_sdk_to_cluster.png ├── add_keyvault.png ├── add_ml_workspace.png ├── add_resource.png ├── add_resource_groups.png ├── add_role_adls_gen2.png ├── adls_add_filesystem.png ├── adls_gen2_advanced_settings.png ├── adls_gen2_basic_settings.png ├── adls_gen2_role_add_form.png ├── adls_select_filesystem.png ├── ado_add_pub_artifacts.png ├── ado_add_pub_artifacts_config.png ├── ado_add_pub_artifacts_config_p2.png ├── ado_add_task.png ├── ado_build_cluster_id.png ├── ado_build_pipe_add_cli_tasks.png ├── ado_build_pipe_link_variable_group.png ├── ado_build_pipe_repo_type.png ├── ado_build_pipe_select_empty_job.png ├── ado_build_pipe_set_build_agent_type.png ├── ado_build_pipe_staging_add_tasks.png ├── ado_build_pipe_var_group_staging.png ├── ado_cli_task_1.png ├── ado_cli_task_1_vars.png ├── ado_cli_task_2_config.png ├── ado_cli_task_3_config.png ├── ado_cli_task_3_config_p2.png ├── ado_cli_task_4_config_p1.png ├── ado_cli_task_4_config_p2.png ├── ado_cont_int_trigger.png ├── ado_copy_files_1.png ├── ado_copy_files_1_p2.png ├── ado_copy_files_2_p2.png ├── ado_copy_files_3_p1.png ├── ado_git_provider_adb.png ├── ado_new_build_pipeline.png ├── ado_output_successful_build.png ├── ado_pub_test_cov_p1.png ├── ado_pub_test_cov_p2.png ├── ado_pub_test_p1.png ├── ado_pub_test_p2.png ├── ado_rp_add_build_artifacts.png ├── ado_rp_add_variable_group.png ├── ado_rp_automate_rp.png ├── ado_rp_automate_rp_2.png ├── ado_rp_gated_prod.png ├── ado_rp_link_variable_groups.png ├── ado_rp_new_rp.png ├── ado_rp_prod_cli_reveal.png ├── ado_rp_qa_cli_1.png ├── ado_rp_qa_cli_2.png ├── ado_rp_qa_prerelease_condition.png ├── ado_rp_qa_variable_form.png ├── ado_rp_rp_button_click.png ├── ado_rp_success_1.png ├── ado_rp_success_2.png ├── ado_variable_group_available_to_pipeline.png ├── ado_variable_group_form.png ├── confirm_kv_backed_secret_scope.png ├── copy_ado_git_link.png ├── copy_clone_git_repo_link.png ├── copy_files_task.png ├── copy_kv_dns_name.png ├── copy_kv_resource_id.png ├── copy_sp_obj_id.png ├── create_adb_cluster.png ├── create_ado_project.png ├── create_blob_container.png ├── create_pull_request.png ├── create_variable_group_ado.png ├── download_repo_as_zip.png ├── drag_and_drop_data_file.png ├── four_empty_cli_tasks.png ├── generate_adb_token.png ├── get_adb_workspace_id.png ├── grant_sp_dl_access.png ├── inference_code_review.png ├── inference_code_structure.png ├── key_vault_creation_form.png ├── kv_add_sp_app_id_secret.png ├── launch_adb_workspace.png ├── local_test_results_web.png ├── manage_dl_access.png ├── mlservice_name.png ├── mlservice_rg_name.png ├── mlservice_subscription_id.png ├── navigate_key_vault.png ├── not_this_folder.png ├── paste_obj_id_as_user_to_dl.png ├── populate_ml_workspace_resource_creation_settings.png ├── pub_code_coverage.png ├── publish_test_results_task.png ├── refresh_data_store_view.png ├── restore_original_commit.png ├── run_build_local.png ├── select_adb_from_rg.png ├── select_adb_user_icon.png ├── select_cluster_for_configure.png ├── select_storage_account.png ├── select_storage_explorer.png ├── select_storage_explorer_2.png ├── select_storage_gen2.png ├── storage_explorer_add_account.png ├── storage_explorer_add_data.png ├── successful_local_build.png ├── test_model_view.png ├── test_results.png └── verify_ado_build_pipe_post_pub_cov_add.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | # AZ ML TOOLING GENERATED FILES 107 | /Project_One/dockerfile 108 | /Project_One/my_runbuild_local.cmd 109 | /Project_One/notebooks/myenv.yml 110 | /Project_One-Tests/dockerfile -------------------------------------------------------------------------------- /Data Bricks HOL - Presentation.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/Data Bricks HOL - Presentation.pptx -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Project_One-Tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/Project_One-Tests/__init__.py -------------------------------------------------------------------------------- /Project_One-Tests/dockerfile.base: -------------------------------------------------------------------------------- 1 | FROM 2 | 3 | RUN pip install pytest 4 | RUN pip install pytest-cov 5 | 6 | COPY . /var/azureml-app/tests 7 | RUN mkdir /var/azureml-app/tests/junit 8 | 9 | COPY ./__init__.py /var/azureml-app 10 | 11 | RUN chmod +x /var/azureml-app/tests/runtests.sh 12 | 13 | WORKDIR "/var/azureml-app" 14 | 15 | #Ensures python print lines are printed out 16 | ENV PYTHONUNBUFFERED 1 17 | 18 | CMD ["bash", "/var/azureml-app/tests/runtests.sh"] 19 | -------------------------------------------------------------------------------- /Project_One-Tests/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | pytest --doctest-modules --junitxml=/var/azureml-app/tests/junit/test-results.xml --cov=/var/azureml-app/inference_code/ /var/azureml-app/tests --cov-report=xml:/var/azureml-app/tests/junit/coverage.xml --cov-report=html:/var/azureml-app/tests/junit/cov_html -------------------------------------------------------------------------------- /Project_One-Tests/runtests_local.cmd: -------------------------------------------------------------------------------- 1 | :: Remove containers that could be running 2 | docker stop mltests 3 | docker rm mltests 4 | 5 | :: Build AML Container 6 | :: cd .. 7 | :: cd ./Project_One 8 | :: docker build -t mlbuild . 9 | :: docker run --name mlbuild --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock mlbuild 10 | 11 | REM cd .. 12 | REM cd ./Project_One 13 | REM cmd runbuild_local.cmd 14 | 15 | :: TODO: Get generated container ID & replace token in docker file 16 | powershell -Command "$dict = (gc c:/ml_temp/artifacts/artifacts.json) | ConvertFrom-JSON; (gc dockerfile.base) -replace '', $dict.image_location | Out-File dockerfile -Encoding utf8" 17 | 18 | cd .. 19 | cd ./Project_One-Tests 20 | docker build -t mltests . 21 | 22 | if not exist "C:\ml_temp\artifacts\test_results" mkdir C:\ml_temp\artifacts\test_results 23 | docker run --name mltests --privileged -v c:/ml_temp/artifacts/test_results:/var/azureml-app/tests/junit mltests -------------------------------------------------------------------------------- /Project_One-Tests/runtests_pipeline.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | 5 | # -e: immediately exit if any command has a non-zero exit status 6 | # -o: prevents errors in a pipeline from being masked 7 | # IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@) 8 | 9 | cd ml_temp/artifacts 10 | str=$(jq -r '.image_location' artifacts.json) 11 | 12 | echo "################### Image to be tested ################### : " $str 13 | cd / 14 | cd $(System.DefaultWorkingDirectory)/Project_One-Tests 15 | echo "################### Updating Tests Docker File ################### " 16 | sed "s||${str}|g" dockerfile.base > dockerfile 17 | 18 | echo "################### Logging into ACR ################### " 19 | docker login $ACR_NAME -u $ACR_USER -p $ACR_PASSWORD 20 | echo "################### Building MLTESTS Image ################### " 21 | docker build -t mltests . 22 | echo "################### Running MLTests Container and Conducting Tests ################### " 23 | docker run --name mltests -v $(Agent.HomeDirectory)/ml_temp/artifacts/test_results:/var/azureml-app/tests/junit mltests 24 | echo "################### Ending Test Sequence ################### " 25 | sudo chown -R $(id -u):$(id -u) $(Agent.HomeDirectory)/ml_temp/artifacts/test_results/cov_html/ 26 | -------------------------------------------------------------------------------- /Project_One-Tests/test_ml_metrics.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import pytest 4 | sys.path.append("../azureml-app/") #append path for 1 module level up. 5 | from inference_code.model_class import MyModel 6 | from sklearn.metrics.regression import r2_score 7 | 8 | 9 | class Super_secret_data: 10 | [x] = {""} 11 | [y] = {""} 12 | 13 | class TestMLMetrics(object): 14 | """ 15 | testing of the model 16 | """ 17 | def setUp(self): 18 | pass 19 | 20 | def test_r2_within_business_value(self): 21 | m = MyModel() 22 | print("initing Model") 23 | m.init() 24 | 25 | # Add code to load your super secret cross validation stuff 26 | # use secrets encoded in a variable group available in the ADO Pipeline 27 | # cuz scientists can't access that and game the system. 28 | 29 | x1 = '{"age": 37, "hours-per-week": 40.0, "sex": "Female", "occupation" : "Exec-managerial"}' 30 | y1 = [200000, 190000] 31 | # We will now make the prediction and since we have a single sample, will create 2 points by adding and subtracting 10 32 | # just for creating passable data to r2_score - note that this is a meamingless exercise just to demonsrtate the process 33 | # In real case, you will have more meaningful tests and asserts 34 | 35 | y_predicted = m.predict(x1)[0][0] 36 | ypred = [y_predicted+10, y_predicted-10] 37 | print (ypred) 38 | r2score = r2_score(y1, ypred) 39 | 40 | assert(-2 < r2score < 2 ) 41 | 42 | 43 | -------------------------------------------------------------------------------- /Project_One-Tests/test_model.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import pytest 4 | sys.path.append("../azureml-app/") #append path for 1 module level up. 5 | from inference_code.model_class import MyModel 6 | 7 | class TestModel(object): 8 | """ 9 | testing of the model 10 | """ 11 | def setUp(self): 12 | pass 13 | 14 | def test_init(self): 15 | m = MyModel() 16 | m.init() 17 | assert(m.x_scaler is not None) 18 | assert(m.y_scaler is not None) 19 | assert(m.model is not None) 20 | 21 | -------------------------------------------------------------------------------- /Project_One/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/Project_One/__init__.py -------------------------------------------------------------------------------- /Project_One/build.py: -------------------------------------------------------------------------------- 1 | from azureml.core.workspace import Workspace 2 | from azureml.core.authentication import ServicePrincipalAuthentication 3 | from azureml.core.model import Model 4 | from azureml.core.image import ContainerImage, Image 5 | from azureml.core.conda_dependencies import CondaDependencies 6 | import os 7 | from os import walk 8 | import shutil 9 | import json 10 | 11 | def resolve_sub_id(): 12 | return os.environ["SUBSCRIPTION_ID"] 13 | 14 | def resolve_rg(): 15 | return os.environ["RESOURCE_GROUP"] 16 | 17 | def resolve_workspace_name(): 18 | return os.environ["WORKSPACE_NAME"] 19 | 20 | def resolve_state(): 21 | return os.environ["STATE"] 22 | 23 | def resolve_author(): 24 | return os.environ["AUTHOR"] 25 | 26 | def resolve_model_name(): 27 | return os.environ["MODEL_NAME"] 28 | 29 | def resolve_image_name(): 30 | return os.environ["IMAGE_NAME"] 31 | 32 | def run(): 33 | print("entered run") 34 | variables_received = "sub_id: {}, rg: {}, work_name: {}, state: {}, author: {}, model_name: {}" \ 35 | .format(resolve_sub_id(), 36 | resolve_rg(), 37 | resolve_workspace_name(), 38 | resolve_state(), 39 | resolve_author(), 40 | resolve_model_name()) 41 | print(variables_received) 42 | 43 | az_ws = Workspace(resolve_sub_id(), resolve_rg(), resolve_workspace_name()) 44 | print("initialized workspace") 45 | #Get & Download model 46 | model = Model(az_ws, name=resolve_model_name(), tags={"state" : resolve_state(), "created_by" : resolve_author()}) 47 | print("initialized model") 48 | model.download(target_dir="./assets/") 49 | print("downloaded model assets") 50 | #TODO: remove workaround for ml sdk dropping assets into /assets/dacrook folder when files dropped to consistent location 51 | for dir_p, _, f_n in walk("./assets"): 52 | for f in f_n: 53 | abs_path = os.path.abspath(os.path.join(dir_p, f)) 54 | shutil.move(abs_path, "./assets/" + f) 55 | 56 | #Configure Image 57 | my_env = CondaDependencies.create(conda_packages=["numpy", "scikit-learn"]) 58 | with open("myenv.yml","w") as f: 59 | f.write(my_env.serialize_to_string()) 60 | image_config = ContainerImage.image_configuration(execution_script = "score.py", 61 | runtime="python", 62 | conda_file="myenv.yml", 63 | dependencies=["assets", "inference_code"], 64 | tags={"state" : resolve_state(), "created_by" : resolve_author()}) 65 | print("configured image") 66 | #TODO: use this once model is dropped to a consistent location 67 | # image = Image.create(workspace = az_ws, name=resolve_image_name(), models=[model], image_config = image_config) 68 | image = Image.create(workspace = az_ws, name=resolve_image_name(), models=[model], image_config = image_config) 69 | image.wait_for_creation() 70 | print("created image") 71 | if(image.creation_state != "Succeeded"): 72 | raise Exception("Failed to create image.") 73 | print("image location: {}".format(image.image_location)) 74 | artifacts = {"image_location" : image.image_location} 75 | if(not os.path.exists("/artifacts/")): 76 | os.makedirs("/artifacts/") 77 | with open("/artifacts/artifacts.json", "w") as outjson: 78 | json.dump(artifacts, outjson) 79 | 80 | if __name__ == "__main__": 81 | run() -------------------------------------------------------------------------------- /Project_One/dockerfile.base: -------------------------------------------------------------------------------- 1 | FROM continuumio/miniconda3 2 | 3 | RUN apt-get update -y 4 | RUN apt-get upgrade -y 5 | 6 | RUN apt-get install build-essential -y 7 | 8 | RUN pip install --upgrade pip setuptools wheel 9 | 10 | ADD requirements.txt /prereqs/ 11 | RUN pip install -r ./prereqs/requirements.txt 12 | 13 | COPY . . 14 | 15 | ENV SUBSCRIPTION_ID= \ 16 | RESOURCE_GROUP= \ 17 | WORKSPACE_NAME= \ 18 | STATE= \ 19 | AUTHOR= \ 20 | MODEL_NAME= \ 21 | IMAGE_NAME= 22 | 23 | #Ensures python print lines are printed out 24 | ENV PYTHONUNBUFFERED 1 25 | 26 | CMD ["python", "build.py"] -------------------------------------------------------------------------------- /Project_One/inference_code/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/Project_One/inference_code/__init__.py -------------------------------------------------------------------------------- /Project_One/inference_code/model_class.py: -------------------------------------------------------------------------------- 1 | """ 2 | @Description: Model wrapper class for testability. 3 | @Author: David Crook 4 | @Author_Email: DaCrook@Microsoft.com 5 | 6 | Copyright (c) Microsoft Corporation. All rights reserved. 7 | Licensed under the MIT License. 8 | """ 9 | import pickle 10 | import sys 11 | sys.path.append("../azureml-app/") 12 | from inference_code.utility import transform_input 13 | 14 | class MyModel: 15 | x_scaler = None 16 | y_scaler = None 17 | model = None 18 | 19 | def init(self): 20 | root_path = "./assets/" 21 | with open(root_path + "x_scaler.pkl", "rb") as xfile: 22 | self.x_scaler = pickle.load(xfile) 23 | print (self.x_scaler) 24 | with open(root_path + "y_scaler.pkl", "rb") as yfile: 25 | self.y_scaler = pickle.load(yfile) 26 | with open(root_path + "model.pkl", "rb") as mfile: 27 | self.model = pickle.load(mfile) 28 | 29 | def predict(self, input_package): 30 | """ 31 | input_package: json formatted string of the form 32 | {"age": integer, "hours-per-week" : double, "sex" : string, "occupation" string} 33 | 34 | returns json formatted string of the form: {"estimated_wages" : float} 35 | """ 36 | #input_package = '{"age": 37, "hours-per-week" : 40.0, "sex" : "Female", "occupation" : "Exec-managerial"}' 37 | 38 | 39 | x = transform_input(input_package) 40 | print (x) 41 | x = self.x_scaler.transform(x) 42 | y = self.model.predict(x) 43 | y = self.y_scaler.inverse_transform(y) 44 | return y -------------------------------------------------------------------------------- /Project_One/inference_code/utility.py: -------------------------------------------------------------------------------- 1 | """ 2 | @Description: Utility class for transformation of the data package 3 | @Author: David Crook 4 | @Author_Email: DaCrook@Microsoft.com 5 | 6 | Copyright (c) Microsoft Corporation. All rights reserved. 7 | Licensed under the MIT License. 8 | """ 9 | import json 10 | import numpy as np 11 | 12 | def transform_input(input_package): 13 | """ 14 | input_package: raw json input package as agreed upon 15 | returns: numpy array of correct format without pre-processing 16 | """ 17 | print ("loading json") 18 | d = json.loads(input_package) 19 | print(d) 20 | # Add extra processing for some reason. 21 | x = np.array([d["age"], d["hours-per-week"]]).transpose() 22 | return x.reshape(-1,2) 23 | 24 | def transform_output(y): 25 | """ 26 | takes raw output from model and transforms it into the agreed upon interface for worldly consumption 27 | """ 28 | d = {"estimated_wages" : y} 29 | return json.dumps(d) -------------------------------------------------------------------------------- /Project_One/notebooks/submit_run_db.py: -------------------------------------------------------------------------------- 1 | import os 2 | import azureml.core 3 | from azureml.core.runconfig import JarLibrary 4 | from azureml.core.compute import ComputeTarget, DatabricksCompute 5 | from azureml.exceptions import ComputeTargetException 6 | from azureml.core import Workspace, Experiment 7 | from azureml.pipeline.core import Pipeline, PipelineData 8 | from azureml.pipeline.steps import DatabricksStep 9 | from azureml.core.datastore import Datastore 10 | from azureml.data.data_reference import DataReference 11 | from azureml.core.conda_dependencies import CondaDependencies 12 | import ast 13 | 14 | def resolve_dependencies(): 15 | """ 16 | ENV VAR OF FORM: "['numpy', 'scikit-learn', 'azureml-sdk']" 17 | """ 18 | dep_list = ast.literal_eval(os.environ["DEP_LIST"]) 19 | return dep_list 20 | 21 | def resolve_compute_name(): 22 | return os.environ["COMPUTE_NAME"] 23 | 24 | def resolve_rg(): 25 | return os.environ["RESOURCE_GROUP"] 26 | 27 | def resolve_db_workspace_name(): 28 | return os.environ["DB_WORKSPACE_NAME"] 29 | 30 | def resolve_db_access_token(): 31 | return os.environ["DB_ACCESS_TOKEN"] 32 | 33 | def resolve_script_name(): 34 | return os.environ["SCRIPT_NAME"] 35 | 36 | def resolve_subscription_id(): 37 | return os.environ["SUBSCRIPTION_ID"] 38 | 39 | def resolve_ml_workspace_name(): 40 | return os.environ["ML_WORKSPACE_NAME"] 41 | 42 | def resolve_source_directory(): 43 | return os.environ["SOURCE_DIR"] 44 | 45 | def resolve_db_cluster_id(): 46 | return os.environ["DB_CLUSTER_ID"] 47 | 48 | my_env = CondaDependencies.create(conda_packages=resolve_dependencies()) 49 | 50 | with open("myenv.yml","w") as f: 51 | f.write(my_env.serialize_to_string()) 52 | 53 | 54 | ws = Workspace(resolve_subscription_id(), resolve_rg(), resolve_ml_workspace_name()) 55 | 56 | 57 | config = DatabricksCompute.attach_configuration( 58 | resource_group = resolve_rg(), 59 | workspace_name = resolve_db_workspace_name(), 60 | access_token = resolve_db_access_token()) 61 | databricks_compute=ComputeTarget.attach(ws, resolve_compute_name(), config) 62 | databricks_compute.wait_for_completion(True) 63 | 64 | dbPythonInLocalMachineStep = DatabricksStep( 65 | name="DBPythonInLocalMachine", 66 | python_script_name=resolve_script_name(), 67 | source_directory=resolve_source_directory(), 68 | run_name='DB_Worst_Regression_Run', 69 | compute_target=databricks_compute, 70 | existing_cluster_id=resolve_db_cluster_id(), 71 | allow_reuse=True 72 | ) 73 | 74 | 75 | steps = [dbPythonInLocalMachineStep] 76 | pipeline = Pipeline(workspace=ws, steps=steps) 77 | pipeline_run = Experiment(ws, 'DB_Python_Local_demo').submit(pipeline) 78 | pipeline_run.wait_for_completion() 79 | 80 | 81 | #from azureml.widgets import RunDetails 82 | #RunDetails(pipeline_run).show() -------------------------------------------------------------------------------- /Project_One/notebooks/train_model.py: -------------------------------------------------------------------------------- 1 | # Databricks notebook source 2 | # FUTURE SERVICE PRINCIPAL STUFF FOR MOUNTING 3 | secrets = {} 4 | secrets["datalake_fqdn"] = dbutils.secrets.get(scope = "data-lake", key = "datalake-fqdn") 5 | secrets["subscription_id"] = dbutils.secrets.get(scope = "data-lake", key = "subscription-id") 6 | secrets["resource_group"] = dbutils.secrets.get(scope = "data-lake", key = "resource-group") 7 | secrets["ml_workspace_name"] = dbutils.secrets.get(scope = "data-lake", key = "ml-workspace-name") 8 | secrets["alg_state"] = dbutils.secrets.get(scope = "data-lake", key = "alg-state") 9 | secrets["sp_app_id"] = dbutils.secrets.get(scope = "data-lake", key = "sp-app-id") 10 | secrets["sp_password"] = dbutils.secrets.get(scope = "data-lake", key = "sp-password") 11 | secrets["sp_tenant_id"] = dbutils.secrets.get(scope = "data-lake", key = "sp-tenant-id") 12 | secrets["sp_token_endpoint"] = dbutils.secrets.get(scope = "data-lake", key = "sp-token-endpoint") 13 | secrets["created_by"] = dbutils.secrets.get(scope = "data-lake", key = "created-by") 14 | if(secrets["created_by"] == "dev"): 15 | print("dev state, replacing with specific dev alias.") 16 | secrets["created_by"] = "dacrook" 17 | 18 | # COMMAND ---------- 19 | 20 | # 21 | # THIS IS FOR ADLS V2 Mounting 22 | # 23 | configs = {"fs.azure.account.auth.type": "OAuth", 24 | "fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider", 25 | "fs.azure.account.oauth2.client.id": secrets["sp_app_id"], #Service Principal App ID 26 | "fs.azure.account.oauth2.client.secret": secrets["sp_password"], #Service Principal Key 27 | "fs.azure.account.oauth2.client.endpoint": secrets["sp_token_endpoint"]} #directory id 28 | 29 | try: 30 | #mounting the external blob storage as mount point datalake for data storage. 31 | dbutils.fs.mount( 32 | source = secrets["datalake_fqdn"], #blobcontainername@storageaccount 33 | mount_point = "/mnt/datalake", 34 | extra_configs = configs) 35 | except Exception as e: 36 | print("already mounted; no need to do so.") 37 | 38 | # COMMAND ---------- 39 | 40 | #display the files in the folder 41 | dbutils.fs.ls("dbfs:/mnt/datalake") 42 | 43 | # COMMAND ---------- 44 | 45 | census = sqlContext.read.format('csv').options(header='true', inferSchema='true').load('/mnt/datalake/AdultCensusIncome.csv') 46 | census.printSchema() 47 | display(census.select("age", " fnlwgt", " hours-per-week")) 48 | 49 | # COMMAND ---------- 50 | 51 | import numpy as np 52 | from sklearn.model_selection import train_test_split 53 | from sklearn.preprocessing import StandardScaler 54 | from sklearn.linear_model import LinearRegression 55 | from sklearn.metrics import mean_absolute_error, r2_score 56 | import pickle 57 | 58 | # COMMAND ---------- 59 | 60 | x = np.array(census.select("age", " hours-per-week").collect()).reshape(-1,2) 61 | y = np.array(census.select(" fnlwgt").collect()).reshape(-1,1) 62 | 63 | # COMMAND ---------- 64 | 65 | x 66 | y 67 | 68 | # COMMAND ---------- 69 | 70 | #Split data & Train Scalers 71 | x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state = 777, shuffle = True) 72 | x_scaler = StandardScaler().fit(x_train) 73 | y_scaler = StandardScaler().fit(y_train) 74 | 75 | #Transform all data 76 | x_train = x_scaler.transform(x_train) 77 | x_test = x_scaler.transform(x_test) 78 | y_train = y_scaler.transform(y_train) 79 | y_test = y_scaler.transform(y_test) 80 | 81 | model = LinearRegression().fit(x_train, y_train) 82 | 83 | y_predicted = y_scaler.inverse_transform(model.predict(x_test)) 84 | 85 | mae = mean_absolute_error(y_test, y_predicted) 86 | r2 = r2_score(y_test, y_predicted) 87 | 88 | print(mae) 89 | print(r2) 90 | 91 | # COMMAND ---------- 92 | 93 | #Write Files to local file storage 94 | import os 95 | #Also works: "/dbfs/tmp/models/worst_regression/dacrook/" 96 | prefix = "file:/models/worst_regression/" 97 | if not os.path.exists(prefix): 98 | os.makedirs(prefix) 99 | with open(prefix + "x_scaler.pkl", "wb") as handle: 100 | pickle.dump(x_scaler, handle) 101 | with open(prefix + "y_scaler.pkl", "wb") as handle: 102 | pickle.dump(y_scaler, handle) 103 | with open(prefix + "model.pkl", "wb") as handle: 104 | pickle.dump(model, handle) 105 | 106 | #Create an Azure ML Model out of it tagged as dev 107 | from azureml.core.workspace import Workspace 108 | from azureml.core.authentication import ServicePrincipalAuthentication 109 | from azureml.core.model import Model 110 | az_sp = ServicePrincipalAuthentication(secrets["sp_tenant_id"], secrets["sp_app_id"], secrets["sp_password"]) #tenant id 111 | az_ws = Workspace(secrets["subscription_id"], secrets["resource_group"], secrets["ml_workspace_name"], auth= az_sp) 112 | print("Logged in and workspace retreived.") 113 | Model.register(az_ws, model_path = prefix, model_name = "worst_regression", tags={"state" : secrets["alg_state"], "created_by" : secrets["created_by"]}) 114 | 115 | # COMMAND ---------- 116 | 117 | #finally unmount the mount. 118 | try: 119 | dbutils.fs.unmount("/mnt/datalake") 120 | except Exception as e: 121 | print("already unmounted; no need to unmount again.") 122 | -------------------------------------------------------------------------------- /Project_One/requirements.txt: -------------------------------------------------------------------------------- 1 | azureml-sdk -------------------------------------------------------------------------------- /Project_One/run_build_local.cmd: -------------------------------------------------------------------------------- 1 | docker stop mlbuild 2 | docker rm mlbuild 3 | 4 | if not exist "C:\ml_temp\artifacts" mkdir C:\ml_temp\artifacts 5 | 6 | :: REPLACE TOKENS IN dockerfile 7 | set ml_subscription_id="" 8 | set ml_resource_group="" 9 | set ml_workspace_name="" 10 | set ml_alg_state="" 11 | set ml_alg_author="" 12 | set ml_model_name="" 13 | set ml_image_name="" 14 | 15 | powershell -Command "(gc dockerfile.base) -replace '', '%ml_subscription_id%' | Out-File dockerfile -Encoding utf8" 16 | powershell -Command "(gc dockerfile) -replace '', '%ml_resource_group%' | Out-File dockerfile -Encoding utf8" 17 | powershell -Command "(gc dockerfile) -replace '', '%ml_workspace_name%' | Out-File dockerfile -Encoding utf8" 18 | powershell -Command "(gc dockerfile) -replace '', '%ml_alg_state%' | Out-File dockerfile -Encoding utf8" 19 | powershell -Command "(gc dockerfile) -replace '', '%ml_alg_author%' | Out-File dockerfile -Encoding utf8" 20 | powershell -Command "(gc dockerfile) -replace '', '%ml_model_name%' | Out-File dockerfile -Encoding utf8" 21 | powershell -Command "(gc dockerfile) -replace '', '%ml_image_name%' | Out-File dockerfile -Encoding utf8" 22 | 23 | docker build -t mlbuild . 24 | :: docker run --name mlbuild --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v c:/Users/%USERNAME%/.azure:/root/.azure mlbuild 25 | docker run --name mlbuild --privileged -v c:/ml_temp/artifacts:/artifacts/ -v c:/Users/%USERNAME%/.azure/:/root/.azure/ mlbuild 26 | 27 | :: use env variables & use a git ignore to hide settings. 28 | :: possibly have a local build vs remote build cmd/.sh files. 29 | -------------------------------------------------------------------------------- /Project_One/runbuild_pipeline.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | 5 | # -e: immediately exit if any command has a non-zero exit status 6 | # -o: prevents errors in a pipeline from being masked 7 | # IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@) 8 | 9 | #Creating Artifact and Test Results Directories 10 | mkdir ml_temp && cd ml_temp 11 | mkdir artifacts && cd artifacts 12 | mkdir test_results 13 | 14 | #Switching to Project Directory 15 | cd / 16 | cd $(System.DefaultWorkingDirectory)/Project_One 17 | 18 | #Docker Build Inf Container 19 | echo "Building Inference Container" 20 | docker build -t mlbuild . 21 | 22 | #Run Built Container 23 | echo "Running Inference Container" 24 | docker run -e SUBSCRIPTION_ID=$(SUBSCRIPTION_ID) -e RESOURCE_GROUP=$(RESOURCE_GROUP) -e WORKSPACE_NAME=$(WORKSPACE_NAME) -e STATE=$(STATE) -e AUTHOR=$(AUTHOR) -e MODEL_NAME=$(MODEL_NAME) -e IMAGE_NAME=$(IMAGE_NAME) --name mlbuild --rm -v $(Agent.HomeDirectory)/ml_temp/artifacts:/artifacts/ -v /home/vsts/.azure/:/root/.azure/ mlbuild 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Project_One/score.py: -------------------------------------------------------------------------------- 1 | import json 2 | from inference_code.model_class import MyModel 3 | 4 | MODEL = None 5 | 6 | def init(): 7 | global MODEL 8 | MODEL = MyModel() 9 | MODEL.init() 10 | 11 | def run(input_package): 12 | return MODEL.predict(input_package) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Data Bricks HOL - Python & Dev Ops 2 | 3 | ## Hands on Lab – Abstract 4 | This hands on lab is designed for the scenario where a team of scientists and engineers are responsible for the development, maintenance and quality of analytical models which are made available to other teams for consumption. 5 | ## Infrastructure Set Up 6 | This section covers all infrastructure between Azure Dev Ops and Azure resources for the HOL which must be completed prior to the lab. 7 | ## Azure Resource Creation 8 | Covers the creation of all required Azure resources. 9 | Create Resource Groups 10 | Begin by creating 3 resource groups. 11 | * [some-name]-db-dev 12 | * [some-name]-db-pipeline 13 | * [some-name]-db-prod 14 | 15 | ![alt text](./readme_images/add_resource_groups.png) 16 | 17 | ### **Adding Resources to Resource Groups** 18 | These steps should be completed for resource groups [some-name]-db-dev and [some-name]-db-pipeline. 19 | [some-name]-db-prod will have different resources completely. 20 | 21 | --- 22 | #### *Add Machine Learning Service Workspace* 23 | 1. Select “Add a Resource”. 24 | 25 | ![alt text](./readme_images/add_resource.png) 26 | 27 | 2. Search for “machine learning” and select “Machine Learning service workspace” published by Microsoft. Click Create 28 | 29 | ![alt text](./readme_images/add_ml_workspace.png) 30 | 31 | 3. Populate the fields with a naming convention that makes sense to you. Select the correct resource group and ensure the location pairs with your other services. 32 | 33 | ![alt text](./readme_images/populate_ml_workspace_resource_creation_settings.png) 34 | 35 | --- 36 | #### *Add Data Lake (Azure Storage gen 2)* 37 | 1. Select “Add a Resource” form within a resource group pane. 38 | 39 | ![alt text](./readme_images/add_resource.png) 40 | 41 | 2. Search for “Storage” and select “Storage account” and click “create” 42 | 43 | ![alt text](./readme_images/select_storage_account.png) 44 | 45 | 3. Fill out the creation form. Ensure you are in the correct resource group. Give the account a name, ensure it is StorageV2 and set access tier to Cool. 46 | 47 | ![alt text](./readme_images/adls_gen2_basic_settings.png) 48 | 49 | 4. Click on “Advanced” and ensure “Hierarchical namespace” under “Data Lake Storage Gen2” is selected as “enabled”. 50 | 51 | ![alt text](./readme_images/adls_gen2_advanced_settings.png) 52 | 53 | 5. Select Create 54 | --- 55 | #### *Add Azure Key Vault* 56 | 1. Select “Add a Resource” from within a resource group pane. 57 | 58 | ![alt text](./readme_images/add_resource.png) 59 | 60 | 2. Search for “key vault” and select “Key Vault” published by Microsoft. 61 | 62 | ![alt text](./readme_images/add_keyvault.png) 63 | 64 | 3. Populate the creation form. Give a name that is easy to remember and ensure the resource group is the desired resource group as well as the location. 65 | 66 | ![alt text](./readme_images/key_vault_creation_form.png) 67 | 68 | --- 69 | #### *Add a DataBricks Cluster* 70 | 1. Select “Add a Resource” from within a resource group pane. 71 | 72 | ![alt text](./readme_images/add_resource.png) 73 | 74 | 2. Search for DataBricks and select the one published by Microsoft. Click “create”. 75 | 76 | ![alt text](./readme_images/add_adb.png) 77 | 78 | 3. Complete the Form for Creation using [some-name] as the workspace name, the resource group you are operating in for the resource group, select a location and ensure pricing tier is “Premium”. We will be using RBAC controls. 79 | 80 | ![alt text](./readme_images/adb_creation_form.png) 81 | 82 | 4. Navigate back to your resource group and select your newly created workspace 83 | 84 | ![alt text](./readme_images/select_adb_from_rg.png) 85 | 86 | 5. Select to “Launch Workspace” – Do not use the URL link. In the top right. 87 | 88 | ![alt text](./readme_images/launch_adb_workspace.png) 89 | 90 | 6. On the left hand pane, select “Clusters” and then “Create Cluster” 91 | 92 | ![alt text](./readme_images/create_adb_cluster.png) 93 | 94 | 7. Fill out the creation form. MAKE SURE you select “terminate after 120 minutes of inactivity” to help reduce accidental usage and billing. 95 | 96 | ![alt text](./readme_images/adb_cluster_creation_form.png) 97 | 98 | #### *Add AzureML SDK as Library to Cluster.* 99 | 1. From the DataBricks Workspace, click on “Clusters” and then the cluster name. 100 | 101 | ![alt text](./readme_images/select_cluster_for_configure.png) 102 | 103 | 2. Click on the Libraries Tab, Install New, PyPl and enter “azureml-sdk”. Click Install 104 | 105 | ![alt text](./readme_images/add_azml_sdk_to_cluster.png) 106 | 107 | --- 108 | #### *Add Initial Data to Storage* 109 | We want to ensure there is some data in the various data lakes so folks can access it. 110 | 1. Download the file: https://amldockerdatasets.azureedge.net/AdultCensusIncome.csv 111 | 2. Select the storage v2 from your resource group. 112 | 113 | ![alt text](./readme_images/select_storage_gen2.png) 114 | 115 | 3. Select File Systems from the pane on the left and click "+ File system" 116 | 117 | ![alt text](./readme_images/adls_add_filesystem.png) 118 | 119 | 120 | 4. Name the file system "datalake" 121 | 5. Click on the newly created "datalake" file system 122 | 123 | ![alt text](./readme_images/adls_select_filesystem.png) 124 | 125 | 6. Select "Download Azure Storage Explorer" if you do not already have it installed. 126 | 7. Once Azure Storage Explorer is installed, open it. Add an Account and Login using your Azure credentials. 127 | 128 | ![alt text](./readme_images/storage_explorer_add_account.png) 129 | 130 | 8. Find your filesystem inside the account you have now added. Drag and drop the AdultCensusIncome.csv into the main pane. Click Refresh if it does not refresh automatically. 131 | 132 | ![alt text](./readme_images/storage_explorer_add_data.png) 133 | 134 | --- 135 | #### *Create Secrets for Secure & Controlled Storage Mounts* 136 | We parameterize out a few extra values such that the code for mounting data can remain the same regardless of which databricks cluster it is attached to and the access to data is controlled by a cluster & data lake admin instead. These steps should be completed for each databricks workspace within each resource group. 137 | ##### Install Azure & Data Bricks CLI 138 | 1. Ensure python 3.x is installed. 139 | a. If it is not; the easiest way is to install Anaconda. 140 | b. https://www.anaconda.com/download/ 141 | 2. Install the data bricks cli 142 | a. Open a cmd prompt and execute the command: “pip install databricks-cli” 143 | 3. Install the azure cli 144 | a. Open a cmd prompt and execute the command: “pip install azure-cli” 145 | ##### Configure Data Bricks CLI for User 146 | >###### Generate a User Access Token 147 | 1. Launch the DataBricks Workspace from the Azure Portal 148 | 149 | ![alt text](./readme_images/launch_adb_workspace.png) 150 | 151 | 2. In the upper right hand side of the screen, select the user icon. 152 | 153 | ![alt text](./readme_images/select_adb_user_icon.png) 154 | 155 | 3. Select “User Settings” from the drop down. 156 | 4. Select “Generate a New Token” 157 | 158 | ![alt text](./readme_images/generate_adb_token.png) 159 | 160 | 5. Give a good comment and remove the token lifetime (gives permanent token access to cluster; not a best practice) 161 | 162 | ![alt text](./readme_images/adb_token_life.png) 163 | 164 | 6. Copy the token that gets generated. 165 | >###### Authenticate CLI with Token using Profiles 166 | 1. Use the command “databricks configure --token --profile [PROFILENAME] 167 | a. HINT: use dev, test & prod similar to how you named the workspaces and resources groups to more easily differentiate. 168 | 2. Enter the host URL 169 | a. https://eastus.azuredatabricks.net (example) 170 | b. Paste the token generated from the previous step 171 | 3. To use the profiles capability; simply use the –profile flag with the [PROFILENAME] configured to configure the workspace you are targeting. 172 | >###### Create Service Principal and Give Access to Data Lake 173 | This section uses an AD Service principal and provides access to the principal for the data. 174 | 1. Login in to the azure cli by executing the command: “az login” 175 | a. Follow instructions printed out. 176 | 2. Create a service principal by executing the command: “az ad sp create-for-rbac –name [SOMENAME]” 177 | a. Copy the app id 178 | b. COPY the password – you will not be able to get it again. 179 | 3. Get the Service Principal’s object id by executing the command: “az ad sp show –id [AppId]”. Search through the result and find the value of the property “objectId” 180 | b. Copy the objectID 181 | 182 | ![alt text](./readme_images/copy_sp_obj_id.png) 183 | 184 | 4. Open Azure Storage Explorer and right click the datalake container you created previously. Select “Manage Access” 185 | 186 | ![alt text](./readme_images/manage_dl_access.png) 187 | 188 | 5. Paste the objectID into the text box and click “Add” 189 | 190 | ![alt text](./readme_images/paste_obj_id_as_user_to_dl.png) 191 | 192 | 6. Find the object ID in the list, click on it and give it Read, Write & Execute Access as well as Default. Click Save 193 | 194 | ![alt text](./readme_images/grant_sp_dl_access.png) 195 | 196 | 7. Navigate to the Azure Portal and to the ADLS Gen Two Blade for this resource group. Click on Access Control (IAM) 197 | 198 | ![alt text](./readme_images/acccess_control_pane_adls_gen2.png) 199 | 200 | 8. Click on “Add” “Add role assignment” 201 | 202 | ![alt text](./readme_images/add_role_adls_gen2.png) 203 | 204 | 9. The role should be: “Storage Blob Data Contributor” and enter the name for the service principal for this resource group you created and click save. 205 | 206 | ![alt text](./readme_images/adls_gen2_role_add_form.png) 207 | 208 | >###### Create an Azure Key Vault Backed Secret Scope 209 | 1. Navigate to your Databricks workspace (create Secret Scope) with the following format: 210 | * a. https://eastus.azuredatabricks.net/?o=6776691945951303#secrets/createScope 211 | * b. Replace the number after o= with yours: 212 | 213 | ![alt text](./readme_images/get_adb_workspace_id.png) 214 | 215 | * c. Or simply append #secrets/createScope to the end of the url of your workspace. 216 | 2. **Now Navigate to the key vault** for the resource group you are setting up: 217 | 218 | ![alt text](./readme_images/navigate_key_vault.png) 219 | 220 | 3. Copy the DNS name 221 | 222 | ![alt text](./readme_images/copy_kv_dns_name.png) 223 | 224 | 4. Copy the Resource ID 225 | 226 | ![alt text](./readme_images/copy_kv_resource_id.png) 227 | 228 | 5. **Navigate back to Databricks workspace (create Secert Scope)** and name the scope “data-lake”, set for “All Users”. Populate the dns name and resource id of the key vault. And select “Create". 229 | 230 | ![alt text](./readme_images/adb_create_secret_scope.png) 231 | 232 | 6. From the databricks CLI, enter the command: “databricks secrets list-scopes –profile [YOUR PROFILE] 233 | 234 | ![alt text](./readme_images/confirm_kv_backed_secret_scope.png) 235 | 236 | >###### Add Secrets to Secret Scope for Accessing Data 237 | You will need the Service Principal’s password and app id from the previous steps. 238 | 1. Get the app’s tenant id by executing the following command: “az ad sp show –id [AppId]” 239 | a. Copy the value from: “appOwnerTenantId”. 240 | 2. Add the Service Principal’s TenantID to the Azure Key Vault 241 | a. “az keyvault secret set –vault-name [KeyVault for RG] –name “sp-tenant-id” –value [TenantId]” 242 | 3. Add the Service Principal App-ID to the Azure Key Vault 243 | a. “az keyvault secret set –vault-name [KeyVault for RG you are configuring] –name “sp-app-id” –value [service principal’s app id] 244 | 245 | ![alt text](./readme_images/kv_add_sp_app_id_secret.png) 246 | 247 | 4. Add the Service Principal’s password to the Azure Key Vault 248 | a. “az keyvault secret set –vault-name [KeyVault for RG] –name “sp-password” –value [password copied from earlier] 249 | 5. Add the Service Principal’s token endpoint 250 | a. https://login.microsoftonline.com/YOURAPPOWNERTENANTID/oauth2/token 251 | b. “az keyvault secret set –vault-name [KeyVault for RG] –name “sp-token-endpoint” –value [token endpoint] 252 | 6. Add the FQDN of the data lake. 253 | a. “az keyvault secret set –vault-name [KeyVault for RG] –name “datalake-fqdn” –value “abfss://datalake@YOURSTORAGEACCOUNT.dfs.core.windows.net” 254 | 7. Add the subscription id for the ml service. Navigate to the ml service inside your resource group and copy the subscription id. 255 | 1. "az keyvault secret set --vault-name [KeyVault for RG] --name subscription-id --value YOURSUBSCRIPTIONID 256 | 257 | ![alt text](./readme_images/mlservice_subscription_id.png) 258 | 259 | 8. Add the resource group for the ml service. Navigate to the ml service inside your resource group and copy the resource group id. 260 | 1. "az keyvault secret set --vault-name [KeyVault for RG] --name resource-group --value YOURRGNAME 261 | 262 | ![alt text](./readme_images/mlservice_rg_name.png) 263 | 264 | 9. Add the ml service workspace name. Navigate to the ml service within the appropriate resource group and copy the name. 265 | 1. "az keyvault secret set --vault-name [KeyVault for RG] --name ml-workspace-name --value YOURVALUE 266 | 267 | ![alt text](./readme_images/mlservice_name.png) 268 | 269 | 10. Add the "Alg State" This changes per resource group. For the Dev RG, it is "dev", for "Pipeline" it is "pipeline". If you were to add additional clusters for releases for multi-tenancy it should have a convention to help support that. 270 | 1. "az keyvault secret set --vault-name [KeyVault for RG] --name alg-state --value APPROPRIATEVALUE 271 | 272 | 11. Add the "Created By". For now this will simply match "Alg State"'s conventions. 273 | 1. "az keyvault secret set --vault-name [KeyVault for RG] --name created-by --value APPROPRIATEVALUE 274 | 275 | 7. Verify secrets are in the data-lake scope for databricks 276 | a. “databricks secrets list –scope data-lake” 277 | 278 | ## Azure Dev Ops 279 | 280 | Azure Dev Ops is a fully integrated Dev Ops tool with work item features, version control, build and release. It can also be used to stitch together a variety of other tools into one central dev ops plane. 281 | 282 | ### **Creation** 283 | 284 | This section covers creating a project in Azure Dev Ops for the workshop. 285 | 286 | 1. Navigate to https://dev.azure.com 287 | 2. Select the organization you intend to use OR create a new organization. 288 | 3. Create a new project. Pick a name, description. Select “Git” for version control and “Agile” for the work item process. 289 | 290 | ![alt text](./readme_images/create_ado_project.png) 291 | 292 | 4. Invite Additional Users 293 | 294 | ![alt text](./readme_images/add_ado_user_1.png) 295 | 296 | ![alt text](./readme_images/add_ado_user_2.png) 297 | 298 | 5. Click on Repos, Files. 299 | 6. At the very bottom, select “Initialize Repo”. 300 | 301 | ### **Seed the Repo** 302 | 303 | We are going to seed your newly created repository with this repository to reduce mistakes during the workshop as well as be able to focus on what everything is doing as opposed to copy/pasting. This activity should be done only once per new repo. 304 | 305 | 1. navigate to https://github.com/drcrook1/DataBricks_ML_DevOps click "Clone or download" and then "Download ZIP" 306 | 307 | ![alt text](./readme_images/download_repo_as_zip.png) 308 | 309 | **This will have downloaded to your default "downloads" location. 310 | 311 | 2. Create a new empty folder to hold your projects or navigate to the one you usually use. I personally use "C:/projects". 312 | 3. Copy the git url for your ADO repository 313 | 314 | ![alt text](./readme_images/copy_clone_git_repo_link.png) 315 | 316 | **Note, that you may have to "Generate Git credentials" if you have not done so before. 317 | 318 | 4. Navigate to your normal projects folder (C:/projects for me) and execute the command: "git clone PASTEURL" 319 | 1. This will generate a new folder in it. The name will be http friendly with special characters (feel free to remove those) 320 | 321 | 5. Extract the zip file you downloaded earlier. Copy all files *except* the .git folder 322 | 323 | ![alt text](./readme_images/not_this_folder.png) 324 | 325 | 6. your folder structure should be similar to this: 326 | 327 | FOLDER STRUCTURE 328 | 329 | - C:/projects/ 330 | - YOUR REPO NAME / 331 | - Project_One/ 332 | - Project_One-Tests/ 333 | - readme_images/ 334 | - .git/ (not extracted one) 335 | - .pptx (possibly a few) 336 | - .gitignore 337 | - README.md 338 | 339 | 7. Open a command prompt and use "cd" to change into the your projects repo. For me the command would be: "cd C:/projects/YOUR_REPO_NAME" 340 | 8. Execute the cmd "git add ./" 341 | 9. Execute the cmd "git commit -m "initial repo seed"" 342 | 10. Execute the cmd "git push" 343 | 11. Your remote repository should now be seeded with the workshop content. 344 | 345 | ### **Scientists – Initial Setup** 346 | Configure Azure Dev Ops Integrations 347 | Azure Databricks, set your Git provider to Azure DevOps Services on the User Settings page: 348 | 1. Click the User icon at the top right of your screen and select User Settings. 349 | 350 | ![alt text](./readme_images/adb_user_settings.png) 351 | 352 | 2. Click the Git Integration tab. 353 | 3. Change your provider to Azure DevOps Services. 354 | 355 | ![alt text](./readme_images/ado_git_provider_adb.png) 356 | 357 | #### Create & Link Project File w/ Repo 358 | 1. From inside the Data Bricks cluster interface, select workspace, shared, then the drop down, then create and create a “Folder” 359 | 360 | ![alt text](./readme_images/adb_create_folder.png) 361 | 362 | 2. Name the folder “Project_One” 363 | 3. Create a new file inside the project called “train_model”. 364 | 365 | ![alt text](./readme_images/adb_create_notebook.png) 366 | 367 | 4. Link “train_model.py” file to your Azure Dev Ops repository. 368 | a. Copy the git link from your azure dev ops portal: 369 | 370 | b. The format of the link will be: https://dev.azure.com/{yourOrg}/{yourproject}/_git/{yourRepository} 371 | 372 | ![alt text](./readme_images/copy_ado_git_link.png) 373 | 374 | b. Paste into the “link” location in the popup for “Git Preferences” 375 | c. Create a new branch. Name it your unique user ID 376 | d. Use “Project_One/notebooks/train_model.py” as the path in git repo. 377 | 378 | ![alt text](./readme_images/adb_git_link_settings_form.png) 379 | 380 | 5. Notice that the latest version appears to have imported everything and then deleted it. Revert back to the previous commit. Click on the previous commit and then "Restore this revision". 381 | 382 | ![alt text](./readme_images/restore_original_commit.png) 383 | 384 | ## Dev Loop Experience 385 | The dev loop experience encompasses mounting the dev data, exploring that data, training a model; writing the inference code, compiling a dev container; running tests inside the dev container. 386 | ### **Train the world’s worst regression & Stage for inference coding.** 387 | 1. Copy the code from Project_One/notebooks/train_model.py into your databricks train_model.py which was created earlier. 388 | 2. The proctor will step through what exactly the code is doing and why. 389 | 1. Essentially: The precreated secrets are being used to mount to various stores securely and will allow zero code changes as the algorithm progresses across secure environments. 390 | 2. You train a super simple algorithm and register the resulting model files with the AZML service such that we can bridge the divide between databricks and inference coding. This process is ML Framework independent and can be used cross algorithms, frameworks etc. 391 | 392 | **Note:** that when you run the code/cell, it will require you to login using your Azure credentials at https://microsoft.com/devicelogin. Unless you perform this step external to Databricks, the run will not complete. 393 | ### **Inference Coding** 394 | This section extends from having a trained model to now building an inference container which is reflective of the asset we will deliver to our customer base. 395 | 396 | >Code Structure 397 | 398 | ![alt text](./readme_images/inference_code_structure.png) 399 | 400 | Good Code Structure from the beginning is a great way to ensure you are set up well. In this case we are going to follow well defined development strategies via a bit of a hybrid between .net project structures and python project structures. 401 | 402 | We have two folders for each project. Project_One is the primary inference project 403 | ### **Git Pull the train code** 404 | 1. Open a cmd prompt. 405 | 2. Change directory into the root of where your project is. 406 | 3. Execute the commands: 407 | ``` 408 | a. “git checkout ” 409 | b. “git pull” 410 | ``` 411 | ### **Test Driven Development** 412 | 413 | #### Write a Test 414 | You should always start with testing and then writing code to satisfy those tests. The only code which will be required to write is the test_model.py. The facilitation code here is provided for you. 415 | 416 | ![alt text](./readme_images/test_model_view.png) 417 | 418 | Inside this file we will write a very simple unit test to ensure that the x_scaler object is populated during model initialization. 419 | 420 | 1. An example unit test has already been written. Add 1 more unit test to Project_One-Tests/test_model.py. 421 | 2. The facilitation code follows standard pytest rules, so you can even add more test files etc; just follow pytest conventions. 422 | 3. The proctor will run through how the project works. 423 | 1. Project_One is the project code which seperates the inference code as a "provider" type class following similiar principals from the testable web dev space. 424 | 2. Project_One-Tests is your seperated testing code such that it is not coupled with your app development code. 425 | 3. A container is built for the inference code, which is then extended with the test code. The base inference container is the asset expected to be deployed while the extended testing container allows you to test the assets in the same type of format as if they were to be compiled. 426 | 427 | #### Review Inference Code 428 | Normally we would test and ensure the tests fail before writing the inference code; however much of the code is already written, so we will simply review it. 429 | 430 | ![alt text](./readme_images/inference_code_review.png) 431 | 432 | In an ideal world, the only code you would need to worry about is highlighted in red. The current state of tooling as of today is why the other code exists and is not wrapped up as ADO Tasks or VS Code extensions. 433 | 434 | The proctor will run through the code with your, but essentially: 435 | 1. ./Project_One/score.py is what the azure ml sdk expects as the interface and must be populated with an init() and a run(params). The params are what is received in the http request body (or iot edge message over the route) 436 | 2. The code placed in inference_code is to help ensure code coverage is reported appropriately. We follow a similar provider type structure as in web dev when there is a pre-defined functional interface. The objective is to minimize that footprint to 1 line of code. (in score.py init and run) 437 | 3. The rest of the code is a dockerized build process that can run independent of the dependencies installed on your system such that the build on your machine is the same as the build in the build server improving confidence the locally generated and tested asset will match the asset which has probability of being promoted to production. 438 | 439 | We now have inference code with matching train code. Lets build the inference container and test it. 440 | ### **Build Inference Container** 441 | 1. First open runbuild_local.cmd 442 | a. Modify the environment variables to match for the dev environment. These will remain constant for this algorithm and your local environment. 443 | i. Subscription_id 444 | ii. Ml_resource_group 445 | iii. Ml_workspace_name 446 | iv. Ml_alg_author 447 | From the command prompt: 448 | 1. Change directory into the Project_One folder. 449 | 2. Run the runbuild_local.cmd 450 | a. You may need to execute az login prior to executing this command or be interactively logged in (watch the output) 451 | 452 | ![alt text](./readme_images/run_build_local.png) 453 | >Note: you may need to login for Azure ACR using: az acr login --name [acrName] 454 | you can find the acrName in the dockerfile FROM statement in the Project_One-Tests folder 455 | 456 | c. This will execute a bunch of stuff and be on “Creating image” for a while. Occasionally hit enter to see if the cmd prompt output is up to date or not. 457 | 458 | ![alt text](./readme_images/successful_local_build.png) 459 | 460 | ### **Test Inference Container** 461 | 1. Change directory into the Project_One-Tests folder. 462 | 2. Run the runtests_local.cmd file 463 | >Note: Make sure that you have access to Azure ACR by running command: docker login -u [Username] -p [password] loginServerName 464 | you can find the loginServerName, Username and password on the Access keys tab of the ACR in Azure Portal 465 | 3. This will extend the container you created in the previous step, run your unit tests and check your code coverage. The code coverage results can be found in C:/ml_temp/artifacts/test_results These are standard pytest and pytest-cov result outputs. 466 | 467 | ![alt text](./readme_images/test_results.png) 468 | 469 | 5. Click on index.html from cov_html folder 470 | 471 | ![alt text](./readme_images/local_test_results_web.png) 472 | 473 | 7. We have 68% code coverage; could be worse. 474 | ### **Commit & Pull Request.** 475 | 1. We now know that we have an inference container and it passes our unit tests and our code coverage is to a point where we are happy about it. 476 | 2. From the command prompt change directory to the root of the repository. 477 | 3. Execute the following commands to push the changes from your branch: 478 | a. Git add ./ 479 | b. Git commit -m “works” 480 | c. Git push 481 | 4. Create a pull request by going to your ADO site, under repos, pull request, New Pull Request 482 | 483 | ![alt text](./readme_images/create_pull_request.png) 484 | 485 | 5. Populate the request template and ensure you have a reviewer: 486 | 487 | ![alt text](./readme_images/PR_options_form.png) 488 | 489 | 6. Review the changes with the reviewer you selected. Ensure both enter ADO and hit “Approve” and then “Complete”. If you see problems in your peers code; add comments and reject it. Once both reviewers Approve you can complete. This will launch the build pipelines & release pipelines which are connected to master. 490 |   491 | --- 492 | ## Defining your Build Pipeline 493 | 494 | Since we are targeting a different Azure Databricks Environment than the one used in the local Dev Loop described earlier in this document, and since we are concerned with security we will be creating a library asset which will allow us to define secrets from a key vault that points to this new environment. These secrets become available as variables in the build pipeline. Variables give you a convenient way to get key bits of data into various parts of the pipeline. As the name suggests, the value of a variable may change from run to run or job to job of your pipeline. Almost any place where a pipeline requires a text string or a number, you can use a variable instead of hard-coding a value. The system will replace the variable with its current value during the pipeline's execution. 495 | ### **Confirm Secrets Availability** 496 | In addition to the secrets used in the previous sections, the following secrets must be available in the KeyVault associated with the Resource Group for the Build Pipeline to work properly: 497 | * compute-name 498 | * db-workspace-name 499 | * db-access-token 500 | * db-cluster-id 501 | * model-name 502 | * image-name 503 | 504 | >Note: To get db-cluster-id, after creating the cluster in Databricks, select the cluster then 'Advanced Options' and navigate to the 'Tags' tab. 505 | 506 | ![alt text](./readme_images/ado_build_cluster_id.png) 507 | 508 | ### **Creating a Variable Group** 509 | 510 | 1. In your Azure DevOps Subscription navigate to the Library Menu Item and click + Variable Group 511 | 512 | ![alt text](./readme_images/create_variable_group_ado.png) 513 | 514 | 2. Name your variable group as indicated and select the Azure Subscription and KeyVault that you wish to target and toggle the “Link secrets from an Azure key vault as variables” switch to the on position 515 | 516 |   ![alt text](./readme_images/ado_variable_group_form.png) 517 | 518 | 3. Click the + Add button, select the variables that you want to make available to the pipeline, click ok and then Save to make sure that your changes are persisted to your Azure DevOps instance 519 | 520 | ![alt text](./readme_images/ado_variable_group_available_to_pipeline.png) 521 | 522 | ### **Create a Build Pipeline in the Visual Designer** 523 | 524 | The intention of this step is to create an Azure DevOps Pipeline that will mimic the steps from the Local Build Loop, but targets a different Azure Databrick Environment for the training .The connection details of this environment will not be available to the scientists directly and will be managed by the operations team. This pipeline will execute when a PR to master is approved and completed. 525 | >Note: On top-right select your initials or picture and then select 'preview features' and turn off 'New YAML pipeline creation experience' if not already off 526 | 527 | 1. In your Azure DevOps tenant, navigate to Pipelines -> Builds and click on + New and select New build pipeline. 528 | 529 | ![alt text](./readme_images/ado_new_build_pipeline.png) 530 | 531 | 2. Select your source and make sure to select the master branch as we want to make sure that the pipeline is attached the branch that we will be monitoring for Pull Requests. Click Continue. 532 | 533 | ![alt text](./readme_images/ado_build_pipe_repo_type.png) 534 | 535 | 3. Select Empty Job 536 | 537 | ![alt text](./readme_images/ado_build_pipe_select_empty_job.png) 538 | 539 | 4. Name your Pipeline accordingly and select the Hosted Ubuntu 1604 Build Agent from the Agent Pool. 540 | 541 | ![alt text](./readme_images/ado_build_pipe_set_build_agent_type.png) 542 | 543 | 5. Link the variable group that you created earlier by clicking on Variables in the menu bar, followed by Variable groups and click Link Variable Groups. 544 | 545 | ![alt text](./readme_images/ado_build_pipe_link_variable_group.png) 546 | 547 | 6. Select the Staging Environment Variable Group and Click Link. Your pipeline now has access to all the runtime environmental variables to connect to the Staging Environment. 548 | 549 | ![alt text](./readme_images/ado_build_pipe_var_group_staging.png) 550 | 551 | 7. Click back onto Tasks on the menu and click +on the Agent Job to Add the Tasks that you will be configuring for the build process. 552 | 553 | ![alt text](./readme_images/ado_build_pipe_staging_add_tasks.png) 554 |   555 | 8. Type “CLI” in the Search Box and Click the Azure CLI”ADD” button four times. 556 | 557 | ![alt text](./readme_images/ado_build_pipe_add_cli_tasks.png) 558 | 559 | Your Agent Job Step should look like the following when you have completed. 560 | 561 | ![alt text](./readme_images/four_empty_cli_tasks.png) 562 |   563 | 564 | 1. Repeat Step 8 above, but instead of “Azure CLI” add two "Copy Files" Tasks. 565 | 566 | ![alt text](./readme_images/copy_files_task.png) 567 | 568 | 10. Similarly, add a "Publish Test Results" Task 569 | 570 | ![alt text](./readme_images/publish_test_results_task.png) 571 | 572 | 573 | 11. Finally, add a "Publish Code Coverage Results" Task. 574 | 575 | ![alt text](./readme_images/pub_code_coverage.png) 576 | 577 | Your Agent Job should now resemble the following: 578 | 579 | ![alt text](./readme_images/verify_ado_build_pipe_post_pub_cov_add.png) 580 | 581 | 12. The First Azure CLI Task will be used to configure the agent environment and make sure that the required packages are installed to execute the rest of the pipeline. Provide the task with a descriptive name, Select the appropriate Azure Subscription, set the Script Location to “Inline Script” and add the flowing to the inline script window: 582 | * pip3 install -U setuptools 583 | * python3 -m install --upgrade pip 584 | * pip3 install --upgrade azureml-sdk[notebooks] 585 | 586 | Set the remainder of the task properties as depicted below: 587 | 588 | ![alt text](./readme_images/ado_cli_task_1.png) 589 | 590 | ![alt text](./readme_images/ado_cli_task_1_vars.png) 591 | 592 | 13. Click on the second Azure CLI Task, select the appropriate Azure Subscription and configure as follows: 593 | 594 | ![alt text](./readme_images/ado_cli_task_2_config.png) 595 | 596 | 14. Click in the third Azure CLI Task , select the appropriate Azure Subscription and configure the Task as follows : 597 | 598 | ![alt text](./readme_images/ado_cli_task_3_config.png) 599 | 600 | ![alt text](./readme_images/ado_cli_task_3_config_p2.png) 601 | 602 | 15. Click the fourth Azure CLI Task, Select the appropriate Azure Subscription and configure the Task as follows: 603 | 604 | ![alt text](./readme_images/ado_cli_task_4_config_p1.png) 605 | 606 | ![alt text](./readme_images/ado_cli_task_4_config_p2.png) 607 | 608 | 16. Click on the first Copy Files Task and configure the task as follows: 609 | 610 | ![alt text](./readme_images/ado_copy_files_1.png) 611 | 612 | ![alt text](./readme_images/ado_copy_files_1_p2.png) 613 | 614 | 17. Click on the second Copy Files Task and configure the task as follows: 615 | 616 | ![alt text](./readme_images/ado_copy_files_3_p1.png) 617 | 618 | ![alt text](./readme_images/ado_copy_files_2_p2.png) 619 | 620 | 18. Click on the Publish Test Results Task and Configure the task as follows: 621 | 622 | ![alt text](./readme_images/ado_pub_test_p1.png) 623 | 624 | ![alt text](./readme_images/ado_pub_test_p2.png) 625 | 626 | 19. Click on the Publish Code Coverage Task and configure the task as follows: 627 | 628 | ![alt text](./readme_images/ado_pub_test_cov_p1.png) 629 | 630 | ![alt text](./readme_images/ado_pub_test_cov_p2.png) 631 | 632 | 20. On the Agent Job Click the + in order to add a task that will be used to publish the build artifacts for use in a release pipeline later. 633 | 634 | ![alt text](./readme_images/ado_add_task.png) 635 | 636 | Search for Publish and Click “Add” on the Publish Build Artifacts Task 637 | 638 | ![alt text](./readme_images/ado_add_pub_artifacts.png) 639 | 640 | Configure the task as follows: 641 | 642 | ![alt text](./readme_images/ado_add_pub_artifacts_config.png) 643 | 644 | ![alt text](./readme_images/ado_add_pub_artifacts_config_p2.png) 645 | 646 | 21. Enable the Continuous Integration trigger on the pipeline which will make sure that every time a change in made to the master branch of the repository this pipeline will execute. Click the Triggers menu item in the menu bar and click the checkbox to enable continuous integration. 647 | 648 | ![alt text](./readme_images/ado_cont_int_trigger.png) 649 | 650 | You can now Save and Queue this pipeline for a manual build to make sure that it executes from end to end without any issues. 651 | 652 | Output from the pipeline should resemble the following: 653 | 654 | ![alt text](./readme_images/ado_output_successful_build.png) 655 | 656 | --- 657 | ## Defining your Release Pipeline 658 | 659 | While release pipelines are often used to deliver artifacts in a deployed state, our scenario calls for an different approach. Our build artifact is an image that contains our tested model and we will be creating a Two Stage Release that will first deliver the correct image to aQA environment where it can be picked up and be tested by a product team. Once all conditions for the product team is satisfied a release manager will manually approve the Production release step and the model will become available for consumption in the Production Environment. 660 | Creating Variable Groups Required for the Release Pipeline 661 | 1. Click on the Library menu item in the Azure DevOps portal and click 662 | 663 | ![alt text](./readme_images/ado_rp_add_variable_group.png) 664 | 665 | 2. Complete the resulting form as depicted below, making sure that you provide values to the variables that correspond to the Targeted QA Environment 666 | 667 | ![alt text](./readme_images/ado_rp_qa_variable_form.png) 668 | 669 | 3. After each Variable Value has been assigned click the to encrypt its value in the pipeline. 670 | 4. Repeat Steps 2 and 3 above to set up a variable group for the targeted Production Environment. 671 | ### **Create the Release Pipeline** 672 | 1. In the Azure DevOps portal Click on Pipelines -> Releases in the left menu 673 | 674 | ![alt text](./readme_images/ado_rp_rp_button_click.png) 675 | 676 | 2. Click The New pipeline menu item and select New release pipeline 677 | 678 | ![alt text](./readme_images/ado_rp_new_rp.png) 679 | 680 | 3. Add Two Stages, Named QA and Production Respectively ensuring that you select the “Empty Template”. Click on the Pre-deployment condition icon and continue to configure as depicted below. This will prevent the Production deployment from happening automatically unless there is an Approval provided by One or all of the Approvers (dependent on configuration) and that the Production Stage Deployment will timeout after two days with out an approval. 681 | 682 | ![alt text](./readme_images/ado_rp_gated_prod.png) 683 | 684 | 4. Add the build artifacts and link the release pipeline to its associated build pipeline. 685 | 686 | ![alt text](./readme_images/ado_rp_add_build_artifacts.png) 687 | 688 | Note: The value in the Source alias text area will be required to correctly configure the AZ CLI tasks in Steps 6 and 7 below. 689 |   690 | 691 | 5. In the Menu area select variables and link the QA and Production variable to the relevant slots. 692 | 693 | ![alt text](./readme_images/ado_rp_link_variable_groups.png) 694 | 695 | 6. Add a CLI Task to the QA Stage and configure it as follows : 696 | 697 | ![alt text](./readme_images/ado_rp_qa_cli_1.png) 698 | 699 | ![alt text](./readme_images/ado_rp_qa_cli_2.png) 700 | 701 | ** Make sure that the working directory set above reflects the generated path correct path here 702 | $(System.DefaultWorkingDirectory)//PipelineArtifacts 703 | 704 | 7. Repeat Step 6 above for the Production Stage . 705 | 706 | Note that the script internals are identical for both stages but will target different destination repositories based on the Variables groups assigned to each of the stages. 707 | 708 | ![alt text](./readme_images/ado_rp_prod_cli_reveal.png) 709 | 710 | 8. Run a release and inspect the results 711 | 9. To automate the release process click the Continuous Integration Trigger of the Build Artifact and set as follows. 712 | 713 | ![alt text](./readme_images/ado_rp_automate_rp.png) 714 | 715 | ![alt text](./readme_images/ado_rp_automate_rp_2.png) 716 | 717 | 10. Finally click on the Pre-Release Condition for the QA Stage and set as follows. 718 | 719 | ![alt text](./readme_images/ado_rp_qa_prerelease_condition.png) 720 | 721 | 11. A successful release will resemble the following 722 | 723 | ![alt text](./readme_images/ado_rp_success_1.png) 724 | 725 | ![alt text](./readme_images/ado_rp_success_2.png) 726 | 727 | 728 | -------------------------------------------------------------------------------- /readme_images/PR_options_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/PR_options_form.png -------------------------------------------------------------------------------- /readme_images/acccess_control_pane_adls_gen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/acccess_control_pane_adls_gen2.png -------------------------------------------------------------------------------- /readme_images/adb_cluster_creation_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_cluster_creation_form.png -------------------------------------------------------------------------------- /readme_images/adb_create_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_create_folder.png -------------------------------------------------------------------------------- /readme_images/adb_create_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_create_notebook.png -------------------------------------------------------------------------------- /readme_images/adb_create_secret_scope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_create_secret_scope.png -------------------------------------------------------------------------------- /readme_images/adb_creation_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_creation_form.png -------------------------------------------------------------------------------- /readme_images/adb_git_link_settings_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_git_link_settings_form.png -------------------------------------------------------------------------------- /readme_images/adb_token_life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_token_life.png -------------------------------------------------------------------------------- /readme_images/adb_user_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adb_user_settings.png -------------------------------------------------------------------------------- /readme_images/add_adb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_adb.png -------------------------------------------------------------------------------- /readme_images/add_ado_user_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_ado_user_1.png -------------------------------------------------------------------------------- /readme_images/add_ado_user_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_ado_user_2.png -------------------------------------------------------------------------------- /readme_images/add_azml_sdk_to_cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_azml_sdk_to_cluster.png -------------------------------------------------------------------------------- /readme_images/add_keyvault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_keyvault.png -------------------------------------------------------------------------------- /readme_images/add_ml_workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_ml_workspace.png -------------------------------------------------------------------------------- /readme_images/add_resource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_resource.png -------------------------------------------------------------------------------- /readme_images/add_resource_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_resource_groups.png -------------------------------------------------------------------------------- /readme_images/add_role_adls_gen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/add_role_adls_gen2.png -------------------------------------------------------------------------------- /readme_images/adls_add_filesystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adls_add_filesystem.png -------------------------------------------------------------------------------- /readme_images/adls_gen2_advanced_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adls_gen2_advanced_settings.png -------------------------------------------------------------------------------- /readme_images/adls_gen2_basic_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adls_gen2_basic_settings.png -------------------------------------------------------------------------------- /readme_images/adls_gen2_role_add_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adls_gen2_role_add_form.png -------------------------------------------------------------------------------- /readme_images/adls_select_filesystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/adls_select_filesystem.png -------------------------------------------------------------------------------- /readme_images/ado_add_pub_artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_add_pub_artifacts.png -------------------------------------------------------------------------------- /readme_images/ado_add_pub_artifacts_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_add_pub_artifacts_config.png -------------------------------------------------------------------------------- /readme_images/ado_add_pub_artifacts_config_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_add_pub_artifacts_config_p2.png -------------------------------------------------------------------------------- /readme_images/ado_add_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_add_task.png -------------------------------------------------------------------------------- /readme_images/ado_build_cluster_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_cluster_id.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_add_cli_tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_add_cli_tasks.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_link_variable_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_link_variable_group.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_repo_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_repo_type.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_select_empty_job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_select_empty_job.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_set_build_agent_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_set_build_agent_type.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_staging_add_tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_staging_add_tasks.png -------------------------------------------------------------------------------- /readme_images/ado_build_pipe_var_group_staging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_build_pipe_var_group_staging.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_1.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_1_vars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_1_vars.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_2_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_2_config.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_3_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_3_config.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_3_config_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_3_config_p2.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_4_config_p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_4_config_p1.png -------------------------------------------------------------------------------- /readme_images/ado_cli_task_4_config_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cli_task_4_config_p2.png -------------------------------------------------------------------------------- /readme_images/ado_cont_int_trigger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_cont_int_trigger.png -------------------------------------------------------------------------------- /readme_images/ado_copy_files_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_copy_files_1.png -------------------------------------------------------------------------------- /readme_images/ado_copy_files_1_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_copy_files_1_p2.png -------------------------------------------------------------------------------- /readme_images/ado_copy_files_2_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_copy_files_2_p2.png -------------------------------------------------------------------------------- /readme_images/ado_copy_files_3_p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_copy_files_3_p1.png -------------------------------------------------------------------------------- /readme_images/ado_git_provider_adb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_git_provider_adb.png -------------------------------------------------------------------------------- /readme_images/ado_new_build_pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_new_build_pipeline.png -------------------------------------------------------------------------------- /readme_images/ado_output_successful_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_output_successful_build.png -------------------------------------------------------------------------------- /readme_images/ado_pub_test_cov_p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_pub_test_cov_p1.png -------------------------------------------------------------------------------- /readme_images/ado_pub_test_cov_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_pub_test_cov_p2.png -------------------------------------------------------------------------------- /readme_images/ado_pub_test_p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_pub_test_p1.png -------------------------------------------------------------------------------- /readme_images/ado_pub_test_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_pub_test_p2.png -------------------------------------------------------------------------------- /readme_images/ado_rp_add_build_artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_add_build_artifacts.png -------------------------------------------------------------------------------- /readme_images/ado_rp_add_variable_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_add_variable_group.png -------------------------------------------------------------------------------- /readme_images/ado_rp_automate_rp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_automate_rp.png -------------------------------------------------------------------------------- /readme_images/ado_rp_automate_rp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_automate_rp_2.png -------------------------------------------------------------------------------- /readme_images/ado_rp_gated_prod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_gated_prod.png -------------------------------------------------------------------------------- /readme_images/ado_rp_link_variable_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_link_variable_groups.png -------------------------------------------------------------------------------- /readme_images/ado_rp_new_rp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_new_rp.png -------------------------------------------------------------------------------- /readme_images/ado_rp_prod_cli_reveal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_prod_cli_reveal.png -------------------------------------------------------------------------------- /readme_images/ado_rp_qa_cli_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_qa_cli_1.png -------------------------------------------------------------------------------- /readme_images/ado_rp_qa_cli_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_qa_cli_2.png -------------------------------------------------------------------------------- /readme_images/ado_rp_qa_prerelease_condition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_qa_prerelease_condition.png -------------------------------------------------------------------------------- /readme_images/ado_rp_qa_variable_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_qa_variable_form.png -------------------------------------------------------------------------------- /readme_images/ado_rp_rp_button_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_rp_button_click.png -------------------------------------------------------------------------------- /readme_images/ado_rp_success_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_success_1.png -------------------------------------------------------------------------------- /readme_images/ado_rp_success_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_rp_success_2.png -------------------------------------------------------------------------------- /readme_images/ado_variable_group_available_to_pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_variable_group_available_to_pipeline.png -------------------------------------------------------------------------------- /readme_images/ado_variable_group_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/ado_variable_group_form.png -------------------------------------------------------------------------------- /readme_images/confirm_kv_backed_secret_scope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/confirm_kv_backed_secret_scope.png -------------------------------------------------------------------------------- /readme_images/copy_ado_git_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_ado_git_link.png -------------------------------------------------------------------------------- /readme_images/copy_clone_git_repo_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_clone_git_repo_link.png -------------------------------------------------------------------------------- /readme_images/copy_files_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_files_task.png -------------------------------------------------------------------------------- /readme_images/copy_kv_dns_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_kv_dns_name.png -------------------------------------------------------------------------------- /readme_images/copy_kv_resource_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_kv_resource_id.png -------------------------------------------------------------------------------- /readme_images/copy_sp_obj_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/copy_sp_obj_id.png -------------------------------------------------------------------------------- /readme_images/create_adb_cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/create_adb_cluster.png -------------------------------------------------------------------------------- /readme_images/create_ado_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/create_ado_project.png -------------------------------------------------------------------------------- /readme_images/create_blob_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/create_blob_container.png -------------------------------------------------------------------------------- /readme_images/create_pull_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/create_pull_request.png -------------------------------------------------------------------------------- /readme_images/create_variable_group_ado.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/create_variable_group_ado.png -------------------------------------------------------------------------------- /readme_images/download_repo_as_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/download_repo_as_zip.png -------------------------------------------------------------------------------- /readme_images/drag_and_drop_data_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/drag_and_drop_data_file.png -------------------------------------------------------------------------------- /readme_images/four_empty_cli_tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/four_empty_cli_tasks.png -------------------------------------------------------------------------------- /readme_images/generate_adb_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/generate_adb_token.png -------------------------------------------------------------------------------- /readme_images/get_adb_workspace_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/get_adb_workspace_id.png -------------------------------------------------------------------------------- /readme_images/grant_sp_dl_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/grant_sp_dl_access.png -------------------------------------------------------------------------------- /readme_images/inference_code_review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/inference_code_review.png -------------------------------------------------------------------------------- /readme_images/inference_code_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/inference_code_structure.png -------------------------------------------------------------------------------- /readme_images/key_vault_creation_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/key_vault_creation_form.png -------------------------------------------------------------------------------- /readme_images/kv_add_sp_app_id_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/kv_add_sp_app_id_secret.png -------------------------------------------------------------------------------- /readme_images/launch_adb_workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/launch_adb_workspace.png -------------------------------------------------------------------------------- /readme_images/local_test_results_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/local_test_results_web.png -------------------------------------------------------------------------------- /readme_images/manage_dl_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/manage_dl_access.png -------------------------------------------------------------------------------- /readme_images/mlservice_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/mlservice_name.png -------------------------------------------------------------------------------- /readme_images/mlservice_rg_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/mlservice_rg_name.png -------------------------------------------------------------------------------- /readme_images/mlservice_subscription_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/mlservice_subscription_id.png -------------------------------------------------------------------------------- /readme_images/navigate_key_vault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/navigate_key_vault.png -------------------------------------------------------------------------------- /readme_images/not_this_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/not_this_folder.png -------------------------------------------------------------------------------- /readme_images/paste_obj_id_as_user_to_dl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/paste_obj_id_as_user_to_dl.png -------------------------------------------------------------------------------- /readme_images/populate_ml_workspace_resource_creation_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/populate_ml_workspace_resource_creation_settings.png -------------------------------------------------------------------------------- /readme_images/pub_code_coverage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/pub_code_coverage.png -------------------------------------------------------------------------------- /readme_images/publish_test_results_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/publish_test_results_task.png -------------------------------------------------------------------------------- /readme_images/refresh_data_store_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/refresh_data_store_view.png -------------------------------------------------------------------------------- /readme_images/restore_original_commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/restore_original_commit.png -------------------------------------------------------------------------------- /readme_images/run_build_local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/run_build_local.png -------------------------------------------------------------------------------- /readme_images/select_adb_from_rg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_adb_from_rg.png -------------------------------------------------------------------------------- /readme_images/select_adb_user_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_adb_user_icon.png -------------------------------------------------------------------------------- /readme_images/select_cluster_for_configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_cluster_for_configure.png -------------------------------------------------------------------------------- /readme_images/select_storage_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_storage_account.png -------------------------------------------------------------------------------- /readme_images/select_storage_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_storage_explorer.png -------------------------------------------------------------------------------- /readme_images/select_storage_explorer_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_storage_explorer_2.png -------------------------------------------------------------------------------- /readme_images/select_storage_gen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/select_storage_gen2.png -------------------------------------------------------------------------------- /readme_images/storage_explorer_add_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/storage_explorer_add_account.png -------------------------------------------------------------------------------- /readme_images/storage_explorer_add_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/storage_explorer_add_data.png -------------------------------------------------------------------------------- /readme_images/successful_local_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/successful_local_build.png -------------------------------------------------------------------------------- /readme_images/test_model_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/test_model_view.png -------------------------------------------------------------------------------- /readme_images/test_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/test_results.png -------------------------------------------------------------------------------- /readme_images/verify_ado_build_pipe_post_pub_cov_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcrook1/DataBricks_ML_DevOps/2d31b389098bd73f06f89a1ef6ff4f484968f1a5/readme_images/verify_ado_build_pipe_post_pub_cov_add.png --------------------------------------------------------------------------------