{"id":8082,"date":"2023-11-02T09:57:11","date_gmt":"2023-11-02T17:57:11","guid":{"rendered":"https:\/\/live-cometml.pantheonsite.io\/?p=8082"},"modified":"2025-04-24T17:04:49","modified_gmt":"2025-04-24T17:04:49","slug":"empowering-comet-with-gitlab","status":"publish","type":"post","link":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\/","title":{"rendered":"Empowering Comet with GitLab"},"content":{"rendered":"\n<div class=\"fl fm fn fo fp\">\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<figure class=\"mt mu mv mw mx my mq mr paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU\" alt=\"\" width=\"700\" height=\"449\"><\/figure><div class=\"mq mr ms\"><picture><\/picture><\/div>\n<\/div><figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Photo by <a class=\"af nk\" href=\"https:\/\/unsplash.com\/@lopezrobin?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener ugc nofollow\">Lopez Robin<\/a> on <a class=\"af nk\" href=\"https:\/\/unsplash.com\/?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener ugc nofollow\">Unsplash<\/a><\/figcaption><\/figure>\n<p id=\"6fc7\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\"><a class=\"af nk\" href=\"https:\/\/www.comet.com\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet<\/a> is a meta Machine Learning experimentation platform, providing many features to track, compare, optimize and monitor experiments and models. In practice, <strong class=\"be og\">Comet permits tracking datasets and code changes. It also provides tools to improve productivity and collaboration, including panels and reports.<\/strong><\/p>\n<p id=\"a776\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Recently, Comet has been integrated with <a class=\"af nk\" href=\"https:\/\/about.gitlab.com\/?utm_medium=cpc&amp;utm_source=google&amp;utm_campaign=brand_emea_pr_rsa_br_exact&amp;utm_content=homepage_digital_x-pr_english_&amp;_bt=363211725518&amp;_bk=gitlab&amp;_bm=e&amp;_bn=g&amp;_bg=75294586319&amp;gclid=Cj0KCQiA5aWOBhDMARIsAIXLlkcP40ZBeKbE_CnqzK83ouLtwN9ncLKPqXl5CtR1o8EkYgFwcMBJYRIaAofnEALw_wcB\" target=\"_blank\" rel=\"noopener ugc nofollow\">GitLab<\/a>, a very popular DevOps platform that permits the development of secure software in a single application. <strong class=\"be og\">In practice, you can write the code related to your Machine Learning experiment locally, save it to GitLab and build reports and monitor experiment results in Comet.<\/strong><\/p>\n<p id=\"83ef\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Thanks to the <a class=\"af nk\" href=\"https:\/\/heartbeat.comet.ml\/streamline-model-development-with-gitlabs-devops-platform-and-comet-1b2498f86a19\" target=\"_blank\" rel=\"noopener ugc nofollow\">combination between GitLab and Comet<\/a>, you can build CI\/CD (Continuous Integration and Continuous Delivery\/Continuous Deployment) applications easily and quickly.<\/p>\n<p id=\"f689\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\"><strong class=\"be og\">How can you achieve such a goal?<\/strong> Let\u2019s look at a practical example.<\/p>\n<p id=\"dea5\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Imagine that your team wants to build a Machine Learning model that classifies if a banknote is true or false. You write your code and then you want to track your experiment in Comet by monitoring the most popular evaluation metrics for your models, such as precision, recall, and accuracy. Imagine, also, that some members of your team improve your model and want to integrate the changes to your code. Before accepting your colleagues\u2019 code, you want to make sure that her changes improve the model. To solve your problem, you can exploit the power of GitLab.<\/p>\n<p class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">In this article, I describe how to set up the described scenario in Comet and how to integrate it in GitLab. For a more detailed experiment, you can refer to <a class=\"oh iq oi\" style=\"font-family: var(--wpex-body-font-family, var(--wpex-font-sans)); font-size: var(--wpex-body-font-size, 13px);\" href=\"https:\/\/medium.com\/u\/5bad5d5acb8e?source=post_page-----3455f1f54f5d--------------------------------\" target=\"_blank\" rel=\"noopener\">Dhruv Nair<\/a><span style=\"font-family: var(--wpex-body-font-family, var(--wpex-font-sans)); font-size: var(--wpex-body-font-size, 13px);\">\u2019s article, entitled <\/span><a class=\"af nk\" style=\"font-family: var(--wpex-body-font-family, var(--wpex-font-sans)); font-size: var(--wpex-body-font-size, 13px);\" href=\"https:\/\/heartbeat.comet.ml\/streamline-model-development-with-gitlabs-devops-platform-and-comet-1b2498f86a19\" target=\"_blank\" rel=\"noopener ugc nofollow\">Streamline ML Model Development with GitLab\u2019s DevOps Platform and Comet<\/a><span style=\"font-family: var(--wpex-body-font-family, var(--wpex-font-sans)); font-size: var(--wpex-body-font-size, 13px);\">.<\/span><\/p>\n<h2 id=\"d051\" class=\"oj ok fs be ol om on gx oo op oq ha or os ot ou ov ow ox oy oz pa pb pc pd pe bj\">Set up of an Experiment in Comet<\/h2>\n<p id=\"ccc5\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Firstly I log in to the <a class=\"af nk\" href=\"\/login\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet Platform<\/a>. Then, I create a New Project, by clicking the top right button.<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*i9x7To5qZxVq5mhPqPqEEw.png\" alt=\"\" width=\"1000\" height=\"97\"><\/figure><div class=\"mq mr ps\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*i9x7To5qZxVq5mhPqPqEEw.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*i9x7To5qZxVq5mhPqPqEEw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*i9x7To5qZxVq5mhPqPqEEw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*i9x7To5qZxVq5mhPqPqEEw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*i9x7To5qZxVq5mhPqPqEEw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*i9x7To5qZxVq5mhPqPqEEw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*i9x7To5qZxVq5mhPqPqEEw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*i9x7To5qZxVq5mhPqPqEEw.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<figure class=\"mt mu mv mw mx my mq mr paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:524\/1*J3zl4ya-hPsjKPHVvdUFvA.png\" alt=\"\" width=\"524\" height=\"466\"><\/figure><div class=\"mq mr pv\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1048\/format:webp\/1*J3zl4ya-hPsjKPHVvdUFvA.png 1048w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 524px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*J3zl4ya-hPsjKPHVvdUFvA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*J3zl4ya-hPsjKPHVvdUFvA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*J3zl4ya-hPsjKPHVvdUFvA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*J3zl4ya-hPsjKPHVvdUFvA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*J3zl4ya-hPsjKPHVvdUFvA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*J3zl4ya-hPsjKPHVvdUFvA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1048\/1*J3zl4ya-hPsjKPHVvdUFvA.png 1048w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 524px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<p id=\"1313\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Once created, I make a new Experiment by clicking on the top right \u2018Add\u2019 button, as shown in the Figure on the left.<\/p>\n<p id=\"ddd9\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I copy the generated code. Each experiment is identified by its API key and refers to a specific workspace, which corresponds to your username.<\/p>\n<p id=\"088a\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Now, I can write the code for my classifier. I create a new empty script, named <code class=\"cw pw px py pz b\">classifier.py<\/code>.<\/p>\n<p id=\"427a\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Firstly, I define two environment variables, which contain my Experiment secrets:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"4450\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">COMET_API_KEY = os.environ.get(\"COMET_API_KEY\")\nCOMET_WORKSPACE = os.environ.get(\"COMET_WORKSPACE\")<\/span><\/pre>\n<p id=\"e6e1\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">The two variables will be configured later in GitLab, as explained later in this article.<\/p>\n<p id=\"12f3\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Then, I paste the code generated by my Comet experiment:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"9f50\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">from comet_ml import Experiment<\/span><span id=\"65e5\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">experiment = Experiment(\n   api_key=COMET_API_KEY,\n   project_name=\"banknote\",\n   workspace=COMET_WORKSPACE,\n)<\/span><\/pre>\n<p id=\"2858\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Now, I load the <a class=\"af nk\" href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/banknote+authentication\" target=\"_blank\" rel=\"noopener ugc nofollow\">banknote dataset<\/a>:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"6c09\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">import pandas as pd<\/span><span id=\"2f7f\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">df = pd.read_csv('source\/data_banknote_authentication.csv')<\/span><\/pre>\n<figure class=\"mt mu mv mw mx my mq mr paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:668\/1*4-wJ0gkYJaih-je0wAEwFw.png\" alt=\"\" width=\"668\" height=\"353\"><\/figure><div class=\"mq mr qj\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1336\/format:webp\/1*4-wJ0gkYJaih-je0wAEwFw.png 1336w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 668px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*4-wJ0gkYJaih-je0wAEwFw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*4-wJ0gkYJaih-je0wAEwFw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*4-wJ0gkYJaih-je0wAEwFw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*4-wJ0gkYJaih-je0wAEwFw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*4-wJ0gkYJaih-je0wAEwFw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*4-wJ0gkYJaih-je0wAEwFw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1336\/1*4-wJ0gkYJaih-je0wAEwFw.png 1336w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 668px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<p id=\"ff77\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I extract from it <code class=\"cw pw px py pz b\">X<\/code> and <code class=\"cw pw px py pz b\">Y<\/code>:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"ef87\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">cols = ['Variance', 'Skewness', 'Kurtosis', 'Entropy']\nX = df[cols]\nY = df['Class']<\/span><\/pre>\n<p id=\"b19b\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Since the input features are not scaled, I transform them through a Min-Max Scaler:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"f066\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">from sklearn.preprocessing import MinMaxScaler<\/span><span id=\"dc34\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">scaler = MinMaxScaler()\nX_scaled = scaler.fit_transform(X)<\/span><\/pre>\n<p id=\"8fe5\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I split the dataset into training and test sets:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"e889\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">from sklearn.model_selection import train_test_split<\/span><span id=\"62a3\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">X_train, X_test, y_train, y_test = train_test_split(X_scaled, Y, test_size=0.33, random_state=42)<\/span><\/pre>\n<p id=\"4453\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">And I fit a K-Neighbors Classifier:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"72fe\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">from sklearn.neighbors import KNeighborsClassifier<\/span><span id=\"7962\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">model = KNeighborsClassifier(n_neighbors=3)\nmodel.fit(X_train,y_train)<\/span><\/pre>\n<p id=\"796f\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Now I evaluate the model:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"fa77\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">from sklearn.metrics import classification_report<\/span><span id=\"223f\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">y_pred = model.predict(X_test)<\/span><span id=\"3c50\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">target_names=['class 0', 'class 1']\nreport = classification_report(y_test, y_pred, target_names=target_names, output_dict=True)<\/span><\/pre>\n<p id=\"9caf\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Finally, I save results in my Comet Experiment:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"04b6\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">for label, metric in report.items():\n  try:\n    experiment.log_metrics(metric, prefix=label)\n  except:\n    experiment.log_metric(label, metric)<\/span><\/pre>\n<p id=\"2937\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I also build a confusion matrix:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"4c96\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">experiment.log_confusion_matrix(y_test.tolist(), y_pred.tolist())<\/span><\/pre>\n<p id=\"5906\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I save my script, and I run it:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"b8e0\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">python classifier.py<\/span><\/pre>\n<p id=\"edd8\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">When the script is completed, I can check the results in my Comet workspace. There is a table with all my metrics, as shown in the following figure:<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*wRN2Ik6pnGO2QZRFW95E_w.png\" alt=\"\" width=\"1000\" height=\"314\"><\/figure><div class=\"mq mr qk\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*wRN2Ik6pnGO2QZRFW95E_w.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*wRN2Ik6pnGO2QZRFW95E_w.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*wRN2Ik6pnGO2QZRFW95E_w.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*wRN2Ik6pnGO2QZRFW95E_w.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*wRN2Ik6pnGO2QZRFW95E_w.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*wRN2Ik6pnGO2QZRFW95E_w.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*wRN2Ik6pnGO2QZRFW95E_w.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*wRN2Ik6pnGO2QZRFW95E_w.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<p id=\"7f5b\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">In addition, the confusion matrix has been created:<\/p>\n<figure class=\"mt mu mv mw mx my mq mr paragraph-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:283\/1*Yv7YUmdWcHvTfmvbDr39fw.png\" alt=\"\" width=\"283\" height=\"345\"><\/figure><div class=\"mq mr ql\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:566\/format:webp\/1*Yv7YUmdWcHvTfmvbDr39fw.png 566w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 283px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*Yv7YUmdWcHvTfmvbDr39fw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*Yv7YUmdWcHvTfmvbDr39fw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*Yv7YUmdWcHvTfmvbDr39fw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*Yv7YUmdWcHvTfmvbDr39fw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*Yv7YUmdWcHvTfmvbDr39fw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*Yv7YUmdWcHvTfmvbDr39fw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:566\/1*Yv7YUmdWcHvTfmvbDr39fw.png 566w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 283px\" data-testid=\"og\"><\/picture><\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<p id=\"ea61\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">The experiment is ready and working. The next step involves its integration with GitLab.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fl fm fn fo fp\">\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<blockquote class=\"qu\"><p id=\"0722\" class=\"qv qw fs be qx qy qz ra rb rc rd of dw\" data-selectable-paragraph=\"\">How does the team at Uber manage to keep their data organized and their team united? Comet\u2019s experiment tracking. <a class=\"af nk\" href=\"https:\/\/www.comet.com\/site\/how-uber-manages-machine-learning-experiments-with-comet\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Learn more from Uber\u2019s Olcay Cirit.<\/a><\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fl fm fn fo fp\">\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<h2 id=\"c8d7\" class=\"oj ok fs be ol om re gx oo op rf ha or os rg ou ov ow rh oy oz pa ri pc pd pe bj\">Set-Up of Gitlab<\/h2>\n<p id=\"8f99\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Firstly, I log in to <a class=\"af nk\" href=\"https:\/\/gitlab.com\/users\/sign_in\" target=\"_blank\" rel=\"noopener ugc nofollow\">GitLab<\/a>. Then, I create a new project by clicking the top right button. I entitle my project <code class=\"cw pw px py pz b\">banknote<\/code>.<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png\" alt=\"\" width=\"1000\" height=\"77\"><\/figure><div class=\"mq mr rj\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*YGAYdaG2RoWb1Pjv3hm6ZA.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<h2 id=\"6524\" class=\"qe ok fs be ol rk rl rm oo rn ro rp or nt rq rr rs nx rt ru rv ob rw rx ry fy bj\" data-selectable-paragraph=\"\">Configure Environment Variables<\/h2>\n<p id=\"27a0\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Then, I must configure the two environment variables exploited by my script. I select my project, then, from the menu on the left, I select Settings \u2192 CI\/CD \u2192 Variables \u2192Expand. I can add two protected variables, named <code class=\"cw pw px py pz b\">COMET_API_KEY<\/code> and <code class=\"cw pw px py pz b\">COMET_WORKSPACE<\/code>, as shown in the following figure:<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*W_2S6cShYf1DYdyaQwd6wQ.png\" alt=\"\" width=\"1000\" height=\"491\"><\/figure><div class=\"mq mr rz\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*W_2S6cShYf1DYdyaQwd6wQ.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*W_2S6cShYf1DYdyaQwd6wQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*W_2S6cShYf1DYdyaQwd6wQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*W_2S6cShYf1DYdyaQwd6wQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*W_2S6cShYf1DYdyaQwd6wQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*W_2S6cShYf1DYdyaQwd6wQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*W_2S6cShYf1DYdyaQwd6wQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*W_2S6cShYf1DYdyaQwd6wQ.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<p id=\"e869\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Only protected branches of the repository can access the protected variables. The main branch is considered protected by default. You can manage who can access protected variables in the Protected Branches tab, which can be accessed from Settings \u2192Repository \u2192Protected Branches \u2192Expand.<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*gCUz5nxjPBhynau0Jfu5-Q.png\" alt=\"\" width=\"1000\" height=\"536\"><\/figure><div class=\"mq mr sa\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*gCUz5nxjPBhynau0Jfu5-Q.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*gCUz5nxjPBhynau0Jfu5-Q.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*gCUz5nxjPBhynau0Jfu5-Q.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*gCUz5nxjPBhynau0Jfu5-Q.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*gCUz5nxjPBhynau0Jfu5-Q.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*gCUz5nxjPBhynau0Jfu5-Q.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*gCUz5nxjPBhynau0Jfu5-Q.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*gCUz5nxjPBhynau0Jfu5-Q.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<h2 id=\"c424\" class=\"qe ok fs be ol rk rl rm oo rn ro rp or nt rq rr rs nx rt ru rv ob rw rx ry fy bj\" data-selectable-paragraph=\"\">Add files to the Project<\/h2>\n<p id=\"ab61\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Once variables have been set, I clone the repository in my local file system. I copy the repository URL which is available by clicking the clone button and I write in a terminal the following command:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"8e37\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">git clone &lt;my_repository_url&gt;<\/span><\/pre>\n<p id=\"53bf\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">A new folder appears in my file system, called <code class=\"cw pw px py pz b\">banknote<\/code>. I copy the <code class=\"cw pw px py pz b\">classifier.py<\/code> file in this folder, as well as the CSV file. I also create a <code class=\"cw pw px py pz b\">requirements.txt<\/code> file, containing the list of libraries needed to run my experiment:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"f060\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">comet-ml\npandas\nscikit-learn<\/span><\/pre>\n<p id=\"ee78\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Then, I add them to the git repository and I save all the changes to my remote workspace in GitLab:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"b455\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">cd banknote\ngit add classifier.py\ngit add requirements.txt\ngit add source\/*.csv\ngit commit -m \"Initial Import\"\ngit push origin<\/span><\/pre>\n<h2 id=\"90ed\" class=\"qe ok fs be ol rk rl rm oo rn ro rp or nt rq rr rs nx rt ru rv ob rw rx ry fy bj\" data-selectable-paragraph=\"\">Run the Experiment on GitLab<\/h2>\n<p id=\"28b0\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Now I\u2019m ready to run my experiment in GitLab. I can exploit the CI\/CD module provided by GitLab: from the menu on the left, I select CI\/CD \u2192Editor \u2192Create a new CI\/CD pipeline. An editor opens, showing the default <code class=\"cw pw px py pz b\">.gitlab-ci.yml<\/code> file. This script specifies the steps needed to run the experiment. I remove the default code and I paste the following one to my <code class=\"cw pw px py pz b\">.gitlab-ci.yml<\/code>file:<\/p>\n<pre class=\"mt mu mv mw mx qa pz qb qc ax qd bj\"><span id=\"9ead\" class=\"qe ok fs pz b ii qf qg l jb qh\" data-selectable-paragraph=\"\">image: python:3.8<\/span><span id=\"a3f0\" class=\"qe ok fs pz b ii qi qg l jb qh\" data-selectable-paragraph=\"\">build-classification:\n  script:\n     - pip install -r requirements.txt\n     - python classifier.py<\/span><\/pre>\n<p id=\"261f\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">I commit changes and automatically the code is executed. When the pipeline is ready, I can click the View pipeline button, located in the top right of the page, and then on the build-classification button<\/p>\n<\/div>\n<\/div>\n<div class=\"my\">\n<div class=\"ab ca\">\n<div class=\"pk pl pm pn po pp ce pq cf pr ch bg\">\n<figure class=\"mt mu mv mw mx my pt pu paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1000\/1*Re8hwsP54okedesmyNy2mA.png\" alt=\"\" width=\"1000\" height=\"73\"><\/figure><div class=\"mq mr sb\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/format:webp\/1*Re8hwsP54okedesmyNy2mA.png 2000w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*Re8hwsP54okedesmyNy2mA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*Re8hwsP54okedesmyNy2mA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*Re8hwsP54okedesmyNy2mA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*Re8hwsP54okedesmyNy2mA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*Re8hwsP54okedesmyNy2mA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*Re8hwsP54okedesmyNy2mA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:2000\/1*Re8hwsP54okedesmyNy2mA.png 2000w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 1000px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"ab ca\">\n<div class=\"ch bg ex ey ez fa\">\n<p id=\"8aee\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">A terminal opens showing the output of the script:<\/p>\n<figure class=\"mt mu mv mw mx my mq mr paragraph-image\">\n<div class=\"mz na ee nb bg nc\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nd ne c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*mv39KI1U3GFBCY_tIFkYfA.png\" alt=\"\" width=\"700\" height=\"504\"><\/figure><div class=\"mq mr sc\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*mv39KI1U3GFBCY_tIFkYfA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*mv39KI1U3GFBCY_tIFkYfA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*mv39KI1U3GFBCY_tIFkYfA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*mv39KI1U3GFBCY_tIFkYfA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*mv39KI1U3GFBCY_tIFkYfA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*mv39KI1U3GFBCY_tIFkYfA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*mv39KI1U3GFBCY_tIFkYfA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*mv39KI1U3GFBCY_tIFkYfA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nf ng nh mq mr ni nj be b bf z dw\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<p id=\"22ca\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">The results of the experiment run in GitLab are available in Comet. In addition, every time I run a new pipeline in the CI\/CD environment, a new experiment is created in Comet.<\/p>\n<p id=\"d41b\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">If a colleague of yours proposes some changes to the code through a pull request, before accepting her changes to the code, you can verify the results in Comet and then decide whether to accept or not.<\/p>\n<h2 id=\"9c07\" class=\"oj ok fs be ol om on gx oo op oq ha or os ot ou ov ow ox oy oz pa pb pc pd pe bj\">Summary<\/h2>\n<p id=\"95db\" class=\"pw-post-body-paragraph nl nm fs be b gv pf no np gy pg nr ns nt ph nv nw nx pi nz oa ob pj od oe of fl bj\" data-selectable-paragraph=\"\">Congratulations! You have just learned how to integrate Comet and GitLab to track your experiments! The process is simple and requires the following steps:<\/p>\n<ul class=\"\">\n<li id=\"1fdf\" class=\"nl nm fs be b gv nn no np gy nq nr ns nt sd nv nw nx se nz oa ob sf od oe of sg sh si bj\" data-selectable-paragraph=\"\">Create a new project in Comet and then a new experiment.<\/li>\n<li id=\"75b1\" class=\"nl nm fs be b gv sj no np gy sk nr ns nt sl nv nw nx sm nz oa ob sn od oe of sg sh si bj\" data-selectable-paragraph=\"\">Write the code for your experiment using your preferred editor.<\/li>\n<li id=\"b89a\" class=\"nl nm fs be b gv sj no np gy sk nr ns nt sl nv nw nx sm nz oa ob sn od oe of sg sh si bj\" data-selectable-paragraph=\"\">Create a new project in Gitlab.<\/li>\n<li id=\"f6ee\" class=\"nl nm fs be b gv sj no np gy sk nr ns nt sl nv nw nx sm nz oa ob sn od oe of sg sh si bj\" data-selectable-paragraph=\"\">Add your files to the project.<\/li>\n<li id=\"307f\" class=\"nl nm fs be b gv sj no np gy sk nr ns nt sl nv nw nx sm nz oa ob sn od oe of sg sh si bj\" data-selectable-paragraph=\"\">Create a new CI\/CD pipeline and run the code in Gitlab.<\/li>\n<li id=\"4d40\" class=\"nl nm fs be b gv sj no np gy sk nr ns nt sl nv nw nx sm nz oa ob sn od oe of sg sh si bj\" data-selectable-paragraph=\"\">Track the results in Comet.<\/li>\n<\/ul>\n<p id=\"1a79\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Comet is a very powerful platform, that also provides other interesting features, which permit you to monitor and visualize your model data in a very innovative way. For example, you can build personalized panels and reports, as well as monitor your experiments during and after the training phase.<\/p>\n<p id=\"50ad\" class=\"pw-post-body-paragraph nl nm fs be b gv nn no np gy nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of fl bj\" data-selectable-paragraph=\"\">Try <a class=\"af nk\" href=\"https:\/\/www.comet.com\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet<\/a> for free today! Happy coding \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Photo by Lopez Robin on Unsplash Comet is a meta Machine Learning experimentation platform, providing many features to track, compare, optimize and monitor experiments and models. In practice, Comet permits tracking datasets and code changes. It also provides tools to improve productivity and collaboration, including panels and reports. Recently, Comet has been integrated with GitLab, [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"customer_name":"","customer_description":"","customer_industry":"","customer_technologies":"","customer_logo":"","footnotes":""},"categories":[23,9,7],"tags":[],"coauthors":[132],"class_list":["post-8082","post","type-post","status-publish","format-standard","hentry","category-integrations","category-product","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Empowering Comet and GitLab<\/title>\n<meta name=\"description\" content=\"Learn how to integrate Comet and GitLab to track your experiments in six easy steps in this blog article. Read more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Empowering Comet with GitLab\" \/>\n<meta property=\"og:description\" content=\"Learn how to integrate Comet and GitLab to track your experiments in six easy steps in this blog article. Read more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\" \/>\n<meta property=\"og:site_name\" content=\"Comet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cometdotml\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-02T17:57:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T17:04:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU\" \/>\n<meta name=\"author\" content=\"Angelica Lo Duca\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Cometml\" \/>\n<meta name=\"twitter:site\" content=\"@Cometml\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angelica Lo Duca\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Empowering Comet and GitLab","description":"Learn how to integrate Comet and GitLab to track your experiments in six easy steps in this blog article. Read more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab","og_locale":"en_US","og_type":"article","og_title":"Empowering Comet with GitLab","og_description":"Learn how to integrate Comet and GitLab to track your experiments in six easy steps in this blog article. Read more.","og_url":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab","og_site_name":"Comet","article_publisher":"https:\/\/www.facebook.com\/cometdotml","article_published_time":"2023-11-02T17:57:11+00:00","article_modified_time":"2025-04-24T17:04:49+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU","type":"","width":"","height":""}],"author":"Angelica Lo Duca","twitter_card":"summary_large_image","twitter_creator":"@Cometml","twitter_site":"@Cometml","twitter_misc":{"Written by":"Angelica Lo Duca","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#article","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\/"},"author":{"name":"Team Comet Digital","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/6266601170c60a7a82b3e0043fbe8ddf"},"headline":"Empowering Comet with GitLab","datePublished":"2023-11-02T17:57:11+00:00","dateModified":"2025-04-24T17:04:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\/"},"wordCount":1109,"publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU","articleSection":["Integrations","Product","Tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab\/","url":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab","name":"Empowering Comet and GitLab","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#primaryimage"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU","datePublished":"2023-11-02T17:57:11+00:00","dateModified":"2025-04-24T17:04:49+00:00","description":"Learn how to integrate Comet and GitLab to track your experiments in six easy steps in this blog article. Read more.","breadcrumb":{"@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#primaryimage","url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU","contentUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*j6mNpY0uJzfX2LmU"},{"@type":"BreadcrumbList","@id":"https:\/\/www.comet.com\/site\/blog\/empowering-comet-with-gitlab#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.comet.com\/site\/"},{"@type":"ListItem","position":2,"name":"Empowering Comet with GitLab"}]},{"@type":"WebSite","@id":"https:\/\/www.comet.com\/site\/#website","url":"https:\/\/www.comet.com\/site\/","name":"Comet","description":"Build Better Models Faster","publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.comet.com\/site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.comet.com\/site\/#organization","name":"Comet ML, Inc.","alternateName":"Comet","url":"https:\/\/www.comet.com\/site\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","width":310,"height":310,"caption":"Comet ML, Inc."},"image":{"@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/cometdotml","https:\/\/x.com\/Cometml","https:\/\/www.youtube.com\/channel\/UCmN63HKvfXSCS-UwVwmK8Hw"]},{"@type":"Person","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/6266601170c60a7a82b3e0043fbe8ddf","name":"Team Comet Digital","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/image\/4f0c0a8cc7c0e87c636ff6a420a6647c","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/Screen-Shot-2023-08-12-at-8.58.50-AM-96x96.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/Screen-Shot-2023-08-12-at-8.58.50-AM-96x96.png","caption":"Team Comet Digital"},"sameAs":["https:\/\/www.comet.ml\/"],"url":"https:\/\/www.comet.com\/site\/blog\/author\/teamcometdigital\/"}]}},"_links":{"self":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/8082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/comments?post=8082"}],"version-history":[{"count":1,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/8082\/revisions"}],"predecessor-version":[{"id":15468,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/8082\/revisions\/15468"}],"wp:attachment":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/media?parent=8082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/categories?post=8082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/tags?post=8082"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/coauthors?post=8082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}