%3CLINGO-SUB%20id%3D%22lingo-sub-1419027%22%20slang%3D%22en-US%22%3EUsing%20GitHub%20Actions%20%26amp%3B%20Azure%20Machine%20Learning%20for%20MLOps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1419027%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--1329387158%22%20id%3D%22toc-hId--1329387158%22%3EBackground%3C%2FH2%3E%0A%3CP%3ELike%20%3CA%20href%3D%22https%3A%2F%2Fwww.weave.works%2Fblog%2Fwhat-is-gitops-really%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitops%3C%2FA%3E%2C%20Machine%20Learning%20Operations%20(or%20MLOps)%20can%20make%20significant%20improvements%20in%20accelerating%20how%20data%20scientists%20can%20impact%20organizational%20needs.%20A%20well-implemented%20MLOps%20process%20not%20only%20speeds%20the%20time%20from%20code%20to%20production%2C%20but%20also%20provides%20ownership%2C%20lineage%20and%20historical%20information%2C%20critical%20for%20understanding%20the%20performance%20of%20any%20machine%20learning%20model.%20Critical%20to%20this%20process%20is%20a%20CI%2FCD%20system%20that%20understands%20the%20elements%20of%20ML%20natively%20as%20well%20as%20stays%20in%20sync%20with%20any%20code%20or%20data%20changes%2C%20no%20matter%20what%20platform%20organizations%20need%20them%20to%20run%20on.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUnfortunately%2C%20many%20data%20scientists%20are%20still%20forced%20to%20implement%20MLOps%20manually.%20Oftentimes%20CI%2FCD%20platforms%20are%20powerful%2C%20but%20quite%20generic%2C%20requiring%20the%20implementation%20of%20%E2%80%9CML%20aware%E2%80%9D%20through%20custom%20code.%20And%2C%20worse%2C%20these%20platforms%20often%20require%20separating%20the%20actions%20from%20the%20code%2C%20leading%20to%20difficulty%20in%20debugging%20and%20hard%20to%20reproduce%20caching%20issues.%20Our%20goal%20is%20to%20both%20give%20these%20data%20scientists%20tools%20that%20are%20easy%20to%20implement%20and%20use.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1158125675%22%20id%3D%22toc-hId-1158125675%22%3EGitHub%20Actions%20and%20Azure%20Machine%20Learning%20To%20The%20Rescue%3C%2FH2%3E%0A%3CP%3EToday%2C%20we%E2%80%99re%20proud%20to%20announce%20a%20series%20of%20GitHub%20Actions%20designed%20to%20allow%20people%20to%20implement%20MLOps%20with%20just%20a%20few%20configuration%20settings%2C%20but%20they%20are%20flexible%20enough%20to%20support%20even%20complicated%20workflows.%20Now%2C%20by%20just%20checking%20in%20your%20code%20or%20opening%20a%20pull%20request%2C%20you%20can%20kick%20off%20an%20entire%20ML%20pipeline%2C%20recording%20all%20information%20about%20the%20process%2C%20and%20updating%20that%20model%20from%20the%20actions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20five%20functions%20we%20have%20published%20are%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E-ERR%3AREF-NOT-FOUND-aml-workspace%20-%20Login%20action%20to%20login%20%2F%20connect%20with%20Azure%20Machine%20Learning%3C%2FLI%3E%0A%3CLI%3E-ERR%3AREF-NOT-FOUND-aml-compute%20-%20Create%20Compute%20action%20to%20create%20compute%20for%20Azure%20Machine%20Learning%20will%20allow%20you%20to%20create%20a%20new%20compute%20target%20on%20Azure%20Machine%20Learning%3C%2FLI%3E%0A%3CLI%3E-ERR%3AREF-NOT-FOUND-aml-run%20-%20Train%20action%20for%20training%20machine%20learning%20models%20using%20Azure%20Machine%20Learning%3C%2FLI%3E%0A%3CLI%3E-ERR%3AREF-NOT-FOUND-aml-registermodel%20-%20Save%20a%20model%20to%20Azure%20Machine%20Learning%3C%2FLI%3E%0A%3CLI%3E-ERR%3AREF-NOT-FOUND-aml-deploy%20-%20Deploy%20action%20to%20deploy%20your%20model%20on%20Azure%20Machine%20Learning%20and%20creates%20a%20real-time%20endpoint%20for%20use%20in%20other%20systems.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3ENOTE%3C%2FSTRONG%3E%3A%20Though%20these%20are%20all%20Azure%20Machine%20Learning%20functions%2C%20GitHub%20Actions%20for%20MLOps%20support%20any%20cloud.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThese%20actions%20are%20based%20on%20-ERR%3AREF-NOT-FOUND-DevOps%20principles%20and%20practices%20that%20increase%20the%20efficiency%20of%20workflows.%20For%20example%2C%20continuous%20integration%2C%20delivery%2C%20and%20deployment.%20We%20have%20applied%20these%20principles%20to%20the%20machine%20learning%20process%20with%20the%20goal%20of%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFaster%20experimentation%20and%20development%20of%20models%3C%2FLI%3E%0A%3CLI%3EFaster%20deployment%20of%20models%20into%20production%3C%2FLI%3E%0A%3CLI%3EQuality%20assurance%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENot%20only%20that%2C%20because%20the%20entire%20MLOps%20as%20a%20service%20is%20hosted%20and%20run%20on%20behalf%20of%20the%20users%2C%20it%20frees%20up%20time%20for%20the%20ML%20Engineers%20to%20focus%20on%20more%20business%20critical%20issues.%20Additionally%2C%20workflows%20can%20be%20updated%20and%20added%20on%20the%20back%20end%20without%20the%20users%20even%20knowing%2C%20making%20maintenance%20of%20these%20pipelines%20even%20easier.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ETo%20show%20you%20end-to-end%20what%20this%20would%20like%2C%20we%20have%20a%20short%20video%3A%3CBR%20%2F%3E%3CIFRAME%20src%3D%22https%3A%2F%2Fwww.youtube-nocookie.com%2Fembed%2FbmFr0LYo_6o%22%20width%3D%22560%22%20height%3D%22315%22%20frameborder%3D%220%22%20allowfullscreen%3D%22allowfullscreen%22%20allow%3D%22accelerometer%3B%20autoplay%3B%20encrypted-media%3B%20gyroscope%3B%20picture-in-picture%22%3E%3C%2FIFRAME%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--649328788%22%20id%3D%22toc-hId--649328788%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-1838184045%22%20id%3D%22toc-hId-1838184045%22%3EWalk-through%3C%2FH2%3E%0A%3CP%3ELet%E2%80%99s%20walk%20you%20through%20how%20you%20would%20implement%20something%20like%20this.%3C%2FP%3E%0A%3CP%3EUsing%20GitHub%20Actions%20and%20Azure%20Machine%20Learning%3C%2FP%3E%0A%3CP%3EFirst%2C%20you%E2%80%99ll%20need%20some%20initial%20setup%20variables.%20These%20include%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAzure%20subscription%3C%2FLI%3E%0A%3CLI%3EContributor%20access%20to%20the%20Azure%20subscription%3C%2FLI%3E%0A%3CLI%3EAccess%20to%20-ERR%3AREF-NOT-FOUND-GitHub%20Actions%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20don%E2%80%99t%20have%20an%20Azure%20subscription%2C%20create%20a%20free%20account%20before%20you%20begin.%20Try%20the%20free%20or%20paid%20version%20of%20Azure%20Machine%20Learning%20today.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESecond%2C%20create%20your%20own%20repository%20from%20the%20template.%20You%20can%20do%20this%22Use%20this%20template%22%20button%20in%20the%20repo%3A%20-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fml-template%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fml-template%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorDavid_Aronchick_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2268747470733a2f2f68656c702e6769746875622e636f6d2f6173736574732f696d616765732f68656c702f7265706f7369746f72792f7573652d746869732d74656d706c6174652d627574746f6e2e706e67.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194601i6A6BB33181A25F0E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2268747470733a2f2f68656c702e6769746875622e636f6d2f6173736574732f696d616765732f68656c702f7265706f7369746f72792f7573652d746869732d74656d706c6174652d627574746f6e2e706e67.png%22%20alt%3D%2268747470733a2f2f68656c702e6769746875622e636f6d2f6173736574732f696d616765732f68656c702f7265706f7369746f72792f7573652d746869732d74656d706c6174652d627574746f6e2e706e67.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThird%2C%20you%E2%80%99ll%20need%20a%20service%20principal%20with%20contributor%20rights%20to%20a%20resource%20group%20(either%20new%20or%20existing).%20To%20create%20a%20new%20one%20on%20Azure%2C%20use%20the%20Azure%20CLI%20on%20your%20computer%20and%20execute%20the%20following%20command%20to%20generate%20the%20required%20credentials%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23%20Replace%20%7Bservice-principal-name%7D%2C%20%7Bsubscription-id%7D%20and%20%7Bresource-group%7D%20with%20your%20%3CBR%20%2F%3E%23%20Azure%20subscription%20id%20and%20resource%20group%20name%20and%20any%20name%20for%20your%20service%20principle%3CBR%20%2F%3Eaz%20ad%20sp%20create-for-rbac%20--name%20%7Bservice-principal-name%7D%20%5C%3CBR%20%2F%3E--role%20contributor%20%5C%3CBR%20%2F%3E--scopes%20%2Fsubscriptions%2F%7Bsubscription-id%7D%2FresourceGroups%2F%7Bresource-group%7D%20%5C%3CBR%20%2F%3E--sdk-auth%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3EThis%20will%20generate%20the%20following%20JSON%20output%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%7B%3CBR%20%2F%3E%22clientId%22%3A%20%22%3CGUID%3E%22%2C%3CBR%20%2F%3E%22clientSecret%22%3A%20%22%3CGUID%3E%22%2C%3CBR%20%2F%3E%22subscriptionId%22%3A%20%22%3CGUID%3E%22%2C%3CBR%20%2F%3E%22tenantId%22%3A%20%22%3CGUID%3E%22%2C%3CBR%20%2F%3E(...)%3CBR%20%2F%3E%7D%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FGUID%3E%3C%2FPRE%3E%0A%3CP%3EAdd%20this%20JSON%20output%20as%20-ERR%3AREF-NOT-FOUND-a%20secret%20with%20the%20name%20AZURE_CREDENTIALS%20in%20your%20GitHub%20repository%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22secrets.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194600i4008C5B8312CCE3D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22secrets.png%22%20alt%3D%22secrets.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20follow%20-ERR%3AREF-NOT-FOUND-this%20link%20for%20more%20details.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ENext%2C%20modify%20the%20parameters%20in%20the%20%3CSTRONG%3E%2F.cloud%2F.azure%2Fworkspace.json%3C%2FSTRONG%3E%26nbsp%3Bfile%20in%20your%20repository%2C%20so%20that%20the%20GitHub%20Actions%20create%20or%20connect%20to%20the%20desired%20Azure%20Machine%20Learning%20workspace.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EOnce%20you%20save%20your%20changes%20to%20the%20file%2C%20the%20predefined%20GitHub%20workflow%20that%20trains%20and%20deploys%20a%20model%20on%20Azure%20Machine%20Learning%20gets%20triggered.%20Check%20the%20actions%20tab%20to%20view%20if%20your%20actions%20have%20successfully%20run.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22David_Aronchick_2-1590512009969.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194472i453102EB654D737E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22David_Aronchick_2-1590512009969.png%22%20alt%3D%22David_Aronchick_2-1590512009969.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20have%20a%20running%20pipeline%2C%20you%20can%20start%20modifying%20the%20code%20in%20the%20-ERR%3AREF-NOT-FOUND-code%20folder%20so%20that%20the%20pipeline%20uses%20your%20custom%20code.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20just%20a%20few%20configuration%20settings%2C%20you%20can%20move%20from%20zero%20to%20an%20entire%20code%20%26amp%3B%20GitHub%20Action%20driven%20workflow.%20In%20addition%20to%20the%20above%20actions%2C%20we%20are%20also%20publishing%20two%20templates%20that%20include%20code%20and%20workflow%20definitions%20for%20an%20end%20to%20end%20ML%2FAI%20lifecycle.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESimple%20template%20repository%3A%20-ERR%3AREF-NOT-FOUND-ml-template-azure%3CBR%20%2F%3EGo%20to%20this%20template%20and%20follow%20the%20getting%20started%20guide%20to%20set%20up%20an%20ML%20Ops%20process%20within%20minutes%20and%20learn%20how%20to%20use%20the%20Azure%20Machine%20Learning%20GitHub%20Actions%20in%20combination.%20This%20template%20demonstrates%20a%20very%20simple%20process%20for%20training%20and%20deploying%20machine%20learning%20models.%3C%2FLI%3E%0A%3CLI%3EAdvanced%20template%20repository%3A%20-ERR%3AREF-NOT-FOUND-aml-template%3CBR%20%2F%3EThis%20template%20demonstrates%20how%20approval%20processes%20can%20be%20included%20in%20the%20process%20and%20how%20training%20and%20deployment%20workflows%20can%20be%20split.%20It%20also%20shows%20how%20workflows%20(e.g.%20deployment)%20can%20be%20triggered%20by%20pull%20requests.%20More%20enhancements%20will%20be%20added%20to%20this%20template%20in%20the%20future%20to%20make%20it%20more%20enterprise-ready.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20dive%20into%20either%20repo%20and%20let%20us%20know%20if%20there%E2%80%99s%20anything%20we%20can%20do%20to%20help%20you%20achieve%20your%20goals%20with%20MLOps.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EFurther%2C%20though%20we%E2%80%99ve%20implemented%20the%20first%20version%20using%20Azure%20Machine%20Learning%2C%20the%20platform%20is%20flexible%20enough%20to%20support%20most%20deployment%20platforms%2C%20both%20on-prem%20and%20on%20any%20cloud.%20Just%20clone%20our%20template%20repo%20and%20customize%20on%20your%20own.%20And%20make%20sure%20to%20publish%20your%20actions%20to%20the%20GitHub%20Marketplace%20so%20that%20others%20can%20use%20it!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFinally%2C%20we%20very%20much%20want%20to%20build%20a%20community%20around%20these%20actions%20-%20please%20join%20us%20at%20-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fml-template%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fml-template%3C%2FA%3E%20(for%20the%20standard%20template)%20or%20-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fml-template-advanced%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fml-template-advanced%3C%2FA%3E%20(for%20the%20advanced%20template)%20to%20file%20issues%2C%20pull%20requests%20and%20comments%20about%20what%20we%20can%20do%20better.%20Thank%20you%20so%20much!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E--%20-ERR%3AREF-NOT-FOUND-Zander%2C%20-ERR%3AREF-NOT-FOUND-Marvin%2C%20Pulkit%20%26amp%3B%20-ERR%3AREF-NOT-FOUND-Dave%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1419027%22%20slang%3D%22en-US%22%3E%3CP%3EAnnouncing%26nbsp%3Ba%20series%20of%20GitHub%20Actions%20designed%20to%20allow%20people%20to%20implement%20MLOps%20with%20just%20a%20few%20configuration%20settings%2C%20but%20they%20are%20flexible%20enough%20to%20support%20even%20complicated%20workflows.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1419027%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Machine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMachine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMLOps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Background

Like Gitops, Machine Learning Operations (or MLOps) can make significant improvements in accelerating how data scientists can impact organizational needs. A well-implemented MLOps process not only speeds the time from code to production, but also provides ownership, lineage and historical information, critical for understanding the performance of any machine learning model. Critical to this process is a CI/CD system that understands the elements of ML natively as well as stays in sync with any code or data changes, no matter what platform organizations need them to run on.

 

Unfortunately, many data scientists are still forced to implement MLOps manually. Oftentimes CI/CD platforms are powerful, but quite generic, requiring the implementation of “ML aware” through custom code. And, worse, these platforms often require separating the actions from the code, leading to difficulty in debugging and hard to reproduce caching issues. Our goal is to both give these data scientists tools that are easy to implement and use.

 

GitHub Actions and Azure Machine Learning To The Rescue

Today, we’re proud to announce a series of GitHub Actions designed to allow people to implement MLOps with just a few configuration settings, but they are flexible enough to support even complicated workflows. Now, by just checking in your code or opening a pull request, you can kick off an entire ML pipeline, recording all information about the process, and updating that model from the actions.

 

The first five functions we have published are:

  • aml-workspace - Login action to login / connect with Azure Machine Learning
  • aml-compute - Create Compute action to create compute for Azure Machine Learning will allow you to create a new compute target on Azure Machine Learning
  • aml-run - Train action for training machine learning models using Azure Machine Learning
  • aml-registermodel - Save a model to Azure Machine Learning
  • aml-deploy - Deploy action to deploy your model on Azure Machine Learning and creates a real-time endpoint for use in other systems.

NOTE: Though these are all Azure Machine Learning functions, GitHub Actions for MLOps support any cloud.


These actions are based on DevOps principles and practices that increase the efficiency of workflows. For example, continuous integration, delivery, and deployment. We have applied these principles to the machine learning process with the goal of:

  • Faster experimentation and development of models
  • Faster deployment of models into production
  • Quality assurance

 

Not only that, because the entire MLOps as a service is hosted and run on behalf of the users, it frees up time for the ML Engineers to focus on more business critical issues. Additionally, workflows can be updated and added on the back end without the users even knowing, making maintenance of these pipelines even easier.


To show you end-to-end what this would like, we have a short video:

 

Walk-through

Let’s walk you through how you would implement something like this.

Using GitHub Actions and Azure Machine Learning

First, you’ll need some initial setup variables. These include:

  • Azure subscription
  • Contributor access to the Azure subscription
  • Access to GitHub Actions

If you don’t have an Azure subscription, create a free account before you begin. Try the free or paid version of Azure Machine Learning today.

 

Second, create your own repository from the template. You can do this"Use this template" button in the repo: https://aka.ms/ml-template​

 

68747470733a2f2f68656c702e6769746875622e636f6d2f6173736574732f696d616765732f68656c702f7265706f7369746f72792f7573652d746869732d74656d706c6174652d627574746f6e2e706e67.png

 

Third, you’ll need a service principal with contributor rights to a resource group (either new or existing). To create a new one on Azure, use the Azure CLI on your computer and execute the following command to generate the required credentials:

 

# Replace {service-principal-name}, {subscription-id} and {resource-group} with your 
# Azure subscription id and resource group name and any name for your service principle
az ad sp create-for-rbac --name {service-principal-name} \
--role contributor \
--scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} \
--sdk-auth


This will generate the following JSON output:

 

{
"clientId": "<GUID>",
"clientSecret": "<GUID>",
"subscriptionId": "<GUID>",
"tenantId": "<GUID>",
(...)
}

Add this JSON output as a secret with the name AZURE_CREDENTIALS in your GitHub repository:

 

secrets.png

Please follow this link for more details.


Next, modify the parameters in the /.cloud/.azure/workspace.json file in your repository, so that the GitHub Actions create or connect to the desired Azure Machine Learning workspace.


Once you save your changes to the file, the predefined GitHub workflow that trains and deploys a model on Azure Machine Learning gets triggered. Check the actions tab to view if your actions have successfully run.

 

David_Aronchick_2-1590512009969.png

Now that you have a running pipeline, you can start modifying the code in the code folder so that the pipeline uses your custom code.

 

With just a few configuration settings, you can move from zero to an entire code & GitHub Action driven workflow. In addition to the above actions, we are also publishing two templates that include code and workflow definitions for an end to end ML/AI lifecycle.

 

  1. Simple template repository: ml-template-azure
    Go to this template and follow the getting started guide to set up an ML Ops process within minutes and learn how to use the Azure Machine Learning GitHub Actions in combination. This template demonstrates a very simple process for training and deploying machine learning models.
  2. Advanced template repository: aml-template
    This template demonstrates how approval processes can be included in the process and how training and deployment workflows can be split. It also shows how workflows (e.g. deployment) can be triggered by pull requests. More enhancements will be added to this template in the future to make it more enterprise-ready.

 

Please dive into either repo and let us know if there’s anything we can do to help you achieve your goals with MLOps.


Further, though we’ve implemented the first version using Azure Machine Learning, the platform is flexible enough to support most deployment platforms, both on-prem and on any cloud. Just clone our template repo and customize on your own. And make sure to publish your actions to the GitHub Marketplace so that others can use it!

 

Finally, we very much want to build a community around these actions - please join us at https://aka.ms/ml-template (for the standard template) or https://aka.ms/ml-template-advanced (for the advanced template) to file issues, pull requests and comments about what we can do better. Thank you so much!

 

-- Zander, Marvin, Pulkit & Dave