婢女是什么意思| 河水像什么| 阅兵什么意思| 喝醋有什么作用与功效| 甲状腺是什么意思| 宝玑手表是什么档次| 晚上夜尿多是什么原因| 入殓师是干什么的| 三个七念什么| meq是什么单位| 飞机什么不能带| 炎症是什么病| 来月经拉肚子是什么原因| 喝隔夜茶有什么好处和坏处| 男人眉毛短是什么面相| 梦见洗车是什么意思| 12月4日是什么日子| 孩子咳嗽吃什么药效果好| 头痒是什么原因| 一九九二年属什么生肖| 咳嗽脑袋疼是什么原因| 豆包是什么意思| 嫣字五行属什么| 媒婆是什么意思| 干将是什么意思| 甲流吃什么药效果最好| 日语亚麻得是什么意思| 红斑狼疮什么症状| 阴吹是什么意思| 早上6点半是什么时辰| 凝视的近义词是什么| 嘴巴苦什么原因| 手指关节肿大是什么原因| 用什么补肾最好| 什么是音调| 红绿色盲是什么遗传| 西地那非是什么| 剪舌系带挂什么科| 停休是什么意思| 213是什么意思| 家里为什么突然有床虱| 什么减肥好| 什么叫溶血| 用什么梳子梳头发最好| 一落千丈是什么生肖| 请结合临床是什么意思| 掌眼什么意思| 为什么鼻子无缘无故流鼻血| 乳腺结节吃什么散结快| 什么头什么节| 相宜的意思是什么| 什么是沉香| 为什么会长瘊子| 圣诞节送什么好| 音色是什么意思| 狗吃什么药会立马就死| 什么的红烧肉| 逼格什么意思| 五行缺什么怎么算| 徒然是什么意思| 大便深褐色是什么原因| 属鼠适合佩戴什么饰品| 吕布的马叫什么| 什么是人工智能| skp什么意思| 贫血会引起什么症状| 一个黑一个出读什么| 1986年虎是什么命| 缺钙吃什么| 知了猴什么时候结束| 璟五行属什么| 猹是什么| 激素六项检查挂什么科| 默契是什么意思| 上次闰六月是什么时候| 办什么厂比较好| 为什么做梦| 赞聊是什么意思| pet是什么| 什么地听| 刚怀孕肚子有什么变化| 命里缺水取什么名字好| 祖庭是什么意思| 肝郁气滞有什么症状| 什么情况需要割包皮| 婴儿吐泡泡是什么原因| 牙发黑是什么原因怎么办| 装垃圾的工具叫什么| 什么动物冬眠| 代入感是什么意思| 计算机二级什么时候查成绩| 黄瓜什么时候种植| 眉尾上方有痣代表什么| 胆红素偏高是什么意思| acd是什么意思| 基础代谢率是什么意思| 骨骼闭合了还有什么办法可以长高| 肛门松弛是什么原因| 电波系是什么意思| 8.23是什么星座| wendy什么意思| 木命的人适合佩戴什么首饰| 为什么有些人显老| 喜大普奔是什么意思| 精神食粮是什么意思| 左眼皮上有痣代表什么| 季字五行属什么| acb是什么意思| 淋巴细胞百分比偏低是什么原因| 说一个人轴是什么意思| 前列腺彩超能查出什么| jimmy是什么意思| 流局是什么意思| 玫瑰花有什么作用| 复试是什么意思| jdv是什么牌子| 梦见大房子是什么预兆| 捆是什么意思| 平躺就咳嗽是什么原因| 手足无措的意思是什么| 七月十九是什么星座| 2岁属什么生肖| 买二手苹果手机要注意什么| 舌头尖麻木是什么原因| 吃黑木耳有什么好处| 严重失眠吃什么药最好| 9月份有什么节日| 属牛是什么命| 眉毛稀少是什么原因| 子午相冲是什么生肖| 降三高喝什么茶最好| 肾炎康复片主要是治疗什么| 鱼腥草与什么相克| 肾属于什么科| 白鹭吃什么| 脸霜什么牌子的好| 膝盖痛吃什么药好| 为什么晚上睡觉老是做梦| 右肺下叶纤维化灶是什么意思| 吃什么对心脏好改善供血不足| 一毛不拔是什么生肖| 八哥是什么鸟| 想长胖喝什么奶粉好| usim卡是什么卡| 精子不液化吃什么药| ex什么意思| 为什么一般不检查小肠| 阴谋是什么意思| 大型血小板比率偏低是什么意思| 12月12是什么星座| 右边腰疼是什么原因| 专科考研需要什么条件| 红疮狼斑是什么引起的| 西夏国是现在什么地方| headache什么意思| 潘驴邓小闲什么意思| 景泰蓝是什么地方的特种工艺| 1935年属什么生肖属相| 铁棍山药和普通山药有什么区别| 一切尽在不言中什么意思| 供血不足吃什么药好| 乳房痛是什么原因| 虚劳病是什么病| 一月八号是什么星座| 蚊虫叮咬用什么药| 眉毛变白是什么原因| 鸡的祖先是什么动物| 理疗是什么| 长生殿讲的是什么故事| 骨头受伤了吃什么恢复的快| 贫血的人来姨妈会有什么症状| 一个人自言自语的说话是什么病| 腱鞘炎在什么位置| 大力念什么| 肝不好吃什么药效果好| 为什么都开头孢不开阿莫西林| 胃酸过多什么原因| 什么是半月板损伤| 黑科技是什么意思| 胆管结石用什么药能把它除掉| 1975年五行属什么| 人为什么会中暑| 什么叫负氧离子| 结婚28年是什么婚| 干冰是什么| 心肌缺血什么症状| 小孩发育迟缓是什么原因造成的| 洗衣粉和洗衣液有什么区别| 意有所指是什么意思| 半边脸疼是什么原因引起的| 什么的桃花| 上军校需要什么条件| 炒鱿鱼是什么意思| 裂孔疝是什么病| 打点是什么意思| 什么叫做凤凰男| emba是什么意思| 尿道感染应该吃什么药| 吃百家饭是什么意思| 5月11号是什么星座| 喉咙嘶哑吃什么药| 婴儿胀气是什么原因| mect是什么意思| 脂肪肝喝什么茶最好最有效| 脊椎痛什么原因| 乙醇和酒精有什么区别| 琼花是什么意思| 湿疹吃什么食物| 张飞穿针歇后语下一句是什么| 土是念什么| 看望病人送什么东西| 耳后长痣代表什么意思| 闭目养神什么意思| 为什么总是头疼| 吃一个海参相当于吃了什么| 糖尿病早餐吃什么好| 抠脚大汉什么意思| 长期低血糖对人体有什么危害| 高铁动车有什么区别| 丑什么生肖| 奶粉什么时候喝最好| mexican是什么牌子| 祛斑喝什么花茶最有效| 烫伤忌口不能吃什么| 积食内热吃什么药| 苋菜什么人不能吃| choker是什么意思| 贫血吃什么药好| 小便尿出乳白色液体是什么问题| 熊猫是什么科| 青蟹什么季节吃最好| UDCA是什么药| 血糖高饮食需要注意什么| calcium是什么意思| 虾不能和什么水果一起吃| 什么红什么赤| 腹主动脉钙化是什么意思| 为什么白带是黄绿色的| 衣原体感染是什么病| 三角区长痘痘是什么原因| 哈欠是什么意思| 围绝经期吃什么药调理| 57年的鸡是什么命| 北京为什么叫帝都| 感冒吃什么饭菜比较好| 党参长什么样图片| 灏字五行属什么| 壁虎的尾巴有什么用| 贲门炎是什么意思| 边界清是什么意思| 稽留流产是什么原因| 滑膜炎什么症状| 螨虫什么样子| 病案首页是什么| 弥漫性肝病是什么意思| supra是什么牌子| 肚子饿了为什么会叫| pc是什么材质| 胸腺肿瘤是什么病| ella是什么意思| 潜能什么意思| 二月一日是什么星座| 榴莲为什么苦| 肾与性功能有什么关系| 百度

Published on: November 8, 2021

9 min read

肯尼亚桑布鲁郡发生冲突 至少10人死亡肯尼亚布鲁冲突

百度 (1)规划阶段。

Here's a step-by-step look at how to bring ML into software development using Comet on GitLab's DevOps Platform.

Building machine learning-powered applications comes with numerous challenges. When we talk about these challenges, there is a tendency to overly focus on problems related to the quality of a model’s predictions—things like data drift, changes in model architectures, or inference latency.

While these are all problems worthy of deep consideration, an often overlooked challenge in ML development is the process of integrating a model into an existing software application.

If you’re tasked with adding an ML feature to a product, you will almost certainly run into an existing codebase that must play nicely with your model. This is, to put it mildly, not an easy task.

ML is a highly iterative discipline. Teams often make many changes to their codebase and pipelines in the process of developing a model. Coupling an ML codebase to an application’s dependencies, unit tests, and CI/CD pipelines will significantly reduce the velocity with which ML teams can deliver on a solution, since each change would require running these downstream dependencies before a merge can be approved.

In this post, we’re going to demonstrate how you can use Comet with GitLab’s DevOps platform to streamline the workflow for your ML and software engineering teams, allowing them to collaborate without getting in each other's way.

The challenge for ML teams working with application teams

Let’s say your team is working on improving a feature engineering pipeline. You will likely have to test many combinations of features with some baseline model for the task to see which combinations make an impact on model performance.

It is hard to know beforehand which features might be significant, so having to run multiple experiments is inevitable. If your ML code is a part of your application codebase, this would mean having to run your application’s CI/CD pipeline for every feature combination you might be trying.

This will certainly frustrate your Engineering and DevOps teams, since you would be unnecessarily tying up system resources, given that software engineering teams do not need to run their pipelines with the same frequency as ML teams do.

The other issue is that despite having to run numerous experiments, only a single set of outputs from these experiments will make it to your production application. Therefore, the rest of the assets produced through these experiments are not relevant to your application code.

Keeping these two codebases separated will make life a lot easier for everyone – but it also introduces the problem of syncing the latest model between two codebases.

Use The GitLab DevOps Platform and Comet for your model development process

With The GitLab DevOps platform and Comet, we can keep the workflows between ML and engineering teams separated, while enabling cross-team collaboration by preserving the visibility and auditability of the entire model development process across teams.

We will use two separate projects to demonstrate this process. One project will contain our application code for a handwritten digit recognizer, while the other will contain all the code relevant to training and evaluating our model.

We will adopt a process where discussions, code reviews, and model performance metrics get automatically published and tracked within The GitLab DevOps Platform, increasing the velocity and opportunity for collaboration between data scientists and software engineers for machine learning workflows.

Project setup

Our project consists of two projects: comet-model-trainer and ml-ui.

Alt text for your image

The comet-model-trainer repository contains scripts to train and evaluate a model on the MNIST dataset. We have set up The GitLab DevOps Platform in a way that runs the training and evaluation Pipeline whenever a new merge request is opened with the necessary changes.

The ml-ui repository contains the necessary code to build the frontend of our ML application.

Since the code is integrated with Comet, your ML team can easily track the source code, hyperparameters, metrics, and other details related to the development of the model.

Once the training and evaluation steps are completed, we can use Comet to fetch summary metrics from the project as well as metrics from the Candidate model and display them within the merge request; This will allow the ML team to easily review the changes to the model.

Alt text for your image

Alt text for your image

In our case, the average accuracy of the models in the project is 97%. Our Candidate model achieved an accuracy of 99%, so it looks like it is a good fit to promote to production. The metrics displayed here are completely configurable and can be changed as necessary.

When the merge request is approved, the deployment pipeline is triggered and the model is pushed to Comet’s Model Registry. The Model Registry versions each model and links it back to the Comet Experiment that produced it.
Alt text for your image

Once the model is pushed to the Model Registry, it is available to the application code. When the application team wishes to deploy this new version of the model to their app, they simply have to trigger their specific deployment pipeline.

Running the pipeline

Pipeline outline

We will run the process outlined below every time a team member creates a merge request to change code in the build-neural-networkscript:

Alt text for your image

Now, let’s take a look at the yaml config used to define our CI/CD pipelines depicted in the previous diagram:

Alt text for your image

Alt text for your image

Alt text for your image

Let's break down the CI/CD pipeline by describing the gitlab-ci.yml file so you can use it and customize it to your needs.

We start by instructing our GitLab runners to utilize Python:3.8 to run the jobs specified in the pipeline:

Image: python:3.8

Then, we define the job where we want to build and train the neural network:

Build-neural-network

Build-neural-network

In this step, we start by creating a folder where we will store the artifacts generated by this job, install dependencies using the requirements.txt file, and finally execute the corresponding Python script that will be in charge of training the neural network. The training runs in the GitLab runner using the Python image defined above, along with its dependencies.

Once the build-neural-network job has finalized successfully, we move to the next job: write-report-mr

Here, we use another image created by DVC that will allow us to publish a report right in the merge request opened by the contributor who changed code in the neural network script. In this way, we’ve brought software development workflows to the development of ML applications. With the report provided by this job, code and model review can be executed within the merge request view, enabling teams to collaborate not only around the code but also the model performance.

From the merge request page, we get access to loss curves and other relevant performance metrics from the model we are training, along with a link to the Comet Experiment UI, where richer details are provided to evaluate the model performance. These details include interactive charts for model metrics, the model hyperparameters, and Confusion Matrices of the test set performance, to name a few.

Alt text for your image

When the team is done with the code and model review, the merge request gets approved, and the script that generated the model is merged into the main codebase, along with its respective commit and the CI pipeline associated to it. This takes us to the next job:

Register-model

This job uses an integration between GitLab and Comet to upload the reviewed and accepted version of the model to the Comet Model Registry. If you recall, the Model Registry is where models intended for production can be logged and versioned. In order to run the commands that will register the model, we need to set up these variables:

  • COMET_WORKSPACE
  • COMET_PROJECT_NAME

In order to do that, follow the steps described here.

It is worth noting that the register-model job only runs when the merge request gets reviewed and approved, and this behavior is obtained by setting only: main at the end of the job.

Finally, we decide to let a team member have final control of the deployment so therefore we define a manual job: Deploy-ml-ui

Alt text for your image

When triggered, this job will import the model from Comet’s Model Registry and automatically create the necessary containers to build the user interface and deploy to a Kubernetes cluster.

Alt text for your image

This job triggers a downstream pipeline, which means that the UI for this MNIST application resides in a different project. This keeps the codebase for the UI and model training separated but integrated and connected at the moment of deploying the model to a production environment.

Alt text for your image

Key takeaways

In this post, we addressed some of the challenges faced by ML and software teams when it comes to collaborating on delivering ML-powered applications. Some of these challenges include:

  • The discrepancy in the frequency with which each of these teams need to iterate on their codebases and CI/CD pipelines.

  • The fact that only a single set of experiment assets from an ML experimentation pipeline is relevant to the application.

  • The challenge of syncing a model or other experiment assets across independent codebases.

Using The GitLab DevOps Platform and Comet, we can start bridging the gap between ML and software engineering teams over the course of a project.

By having model performance metrics adopted into software development workflows like the one we saw in the issue and merge request, we can keep track of the code changes, discussions, experiments, and models created in the process. All the operations executed by the team are recorded, can be audited, are end-to end-traceable, and (most importantly) reproducible.

Watch a demo of this process:

About Comet: Comet is an MLOps Platform that is designed to help data scientists and teams build better models faster! Comet provides tooling to Track, Explain, Manage, and Monitor your models in a single place!

Learn more about Comet here and get started for free!

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum.
Share your feedback

50%+ of the Fortune 100 trust GitLab

Start shipping better software faster

See what your team can do with the intelligent

DevSecOps platform.

橄榄绿是什么颜色 餐后血糖高吃什么药 门槛费是什么意思 射进去什么感觉 2014年是什么年
挂钟挂在客厅什么位置好 赛博朋克什么意思 血红蛋白低吃什么药 儿童流鼻涕吃什么药 脚趾麻是什么病的前兆
龟头炎什么症状 大便粘马桶是什么原因 失信人是什么意思 aq是什么标准 锦鲤可以和什么鱼混养
牛骨煲汤搭配什么最好 夏天喝什么茶比较好 做梦梦见鬼是什么预兆 钢笔刻字刻什么好 牡丹是什么季节开的
骨头炖什么好吃xscnpatent.com 腰痛去医院挂什么科hcv9jop0ns9r.cn 梅毒症状男有什么表现dayuxmw.com 龟兔赛跑的故事告诉我们什么道理hcv8jop8ns8r.cn 精神衰弱吃什么能改善hcv7jop9ns4r.cn
人生三件大事是指什么hcv7jop9ns9r.cn 海参吃了有什么好处hcv9jop6ns7r.cn 喝中药不能吃什么食物hcv8jop2ns6r.cn 掌眼什么意思hcv9jop1ns1r.cn 高考都考什么hcv8jop9ns5r.cn
为什么会肾虚hcv8jop5ns0r.cn 男人头发硬说明什么hcv7jop6ns6r.cn 吸烟有害健康为什么国家还生产烟hcv7jop5ns0r.cn 带牙套是什么意思hcv9jop2ns4r.cn 牛蒡茶有什么功效hcv9jop5ns5r.cn
灵芝搭配什么煲汤最好wuhaiwuya.com 长期喝咖啡有什么好处和坏处bjhyzcsm.com 办香港通行证要准备什么材料hcv8jop9ns5r.cn 贫血是什么引起的wuhaiwuya.com 小儿消化不良吃什么药最好hcv9jop6ns0r.cn
百度