{"id":4578,"date":"2022-11-10T17:50:07","date_gmt":"2022-11-11T01:50:07","guid":{"rendered":"https:\/\/live-cometml.pantheonsite.io\/?p=4578"},"modified":"2025-04-24T17:16:31","modified_gmt":"2025-04-24T17:16:31","slug":"new-integration-comet-catalyst","status":"publish","type":"post","link":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/","title":{"rendered":"New Integration: Comet + Catalyst"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"ir is it iu iv\">\n<p id=\"69ff\" class=\"kh ki jj bm kj kk kl km kn ko kp kq cn\" data-selectable-paragraph=\"\">We\u2019re excited to announce another excellent and powerful integration with Comet \u2014&nbsp;<a class=\"au kr\" href=\"https:\/\/github.com\/catalyst-team\/catalyst\" target=\"_blank\" rel=\"noopener ugc nofollow\">Catalyst<\/a>! This integration allows you to leverage Comet\u2019s logging capabilities while using the Catalyst framework to structure your Deep Learning Experiment runs<\/p>\n<\/div>\n\n\n\n<div class=\"ir is it iu iv\">\n<h1 id=\"303b\" class=\"kz la jj bm lb lc ld le lf lg lh li lj lk ll lm ln lo lp lq lr ls lt lu lv lw ga\" data-selectable-paragraph=\"\">About Catalyst<\/h1>\n<p id=\"68cf\" class=\"pw-post-body-paragraph lx ly jj bm b lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms kq ir ga\" data-selectable-paragraph=\"\"><a class=\"au kr\" href=\"https:\/\/catalyst-team.github.io\/catalyst\/index.html\" target=\"_blank\" rel=\"noopener ugc nofollow\">Catalyst<\/a>&nbsp;is a PyTorch framework for Deep Learning R&amp;D. It focuses on reproducibility, rapid experimentation, and codebase reusability so you can create something new rather than write yet another train loop. The Catalyst library incorporates research best practices so users can focus on building models and not worry about writing boilerplate code.<\/p>\n<h1 id=\"c2e7\" class=\"kz la jj bm lb lc mt le lf lg mu li lj lk mv lm ln lo mw lq lr ls mx lu lv lw ga\" data-selectable-paragraph=\"\">About the Integration<\/h1>\n<p id=\"423a\" class=\"pw-post-body-paragraph lx ly jj bm b lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms kq ir ga\" data-selectable-paragraph=\"\">Catalyst now ships with a dedicated CometLogger. With a slight modification (3 lines) of your Catalyst training code, you can now log metrics, hyperparameters, source code and much more from your runs to the Comet UI.<\/p>\n<p id=\"3247\" class=\"pw-post-body-paragraph lx ly jj bm b lz my mb mc md mz mf mg mh na mj mk ml nb mn mo mp nc mr ms kq ir ga\" data-selectable-paragraph=\"\"><a class=\"au kr\" href=\"https:\/\/www.comet.com\/docs\/quick-start\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Once you\u2019ve set up your account and configured your Comet API Key<\/a>&nbsp;within your project, simply pass the CometLogger to your Catalyst Trainer and you\u2019re good to go! You\u2019ll then also be able to take advantage of Comet\u2019s&nbsp;<a class=\"au kr\" href=\"https:\/\/www.comet.com\/site\/panels\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">rich visualization capabilities<\/a><\/p>\n<pre>import comet_ml\n\nimport os\nimport torch\nfrom torch import nn, optim\nfrom torch.utils.data import DataLoader\n\nfrom catalyst import dl\nfrom catalyst.data import ToTensor\nfrom catalyst.contrib.datasets import MNIST\nfrom torch.utils.data import DataLoader\n\n\nmodel = nn.Sequential(nn.Flatten(), nn.Linear(28 * 28, 10))\ncriterion = nn.CrossEntropyLoss()\n\nlogger = dl.CometLogger()\n\nhparams = {\"lr\": 1.0e-3, \"batch_size\": 32}\noptimizer = optim.Adam(model.parameters(), lr=hparams[\"lr\"])\nloaders = {\n    \"train\": DataLoader(\n        MNIST(os.getcwd(), train=True, download=True, transform=ToTensor()),\n        batch_size=hparams[\"batch_size\"],\n    ),\n    \"valid\": DataLoader(\n        MNIST(os.getcwd(), train=False, download=True, transform=ToTensor()),\n        batch_size=hparams[\"batch_size\"],\n    ),\n}\n\nrunner = dl.SupervisedRunner(\n    input_key=\"features\", output_key=\"logits\", target_key=\"targets\", loss_key=\"loss\"\n)\n# model training\nrunner.train(\n    model=model,\n    criterion=criterion,\n    optimizer=optimizer,\n    loaders=loaders,\n    hparams=hparams,\n    num_epochs=1,\n    callbacks=[\n        dl.AccuracyCallback(\n            input_key=\"logits\", target_key=\"targets\", topk_args=(1, 3, 5)\n        ),\n        dl.PrecisionRecallF1SupportCallback(\n            input_key=\"logits\", target_key=\"targets\", num_classes=10\n        ),\n    ],\n    logdir=\".\/logs\",\n    valid_loader=\"valid\",\n    valid_metric=\"loss\",\n    minimize_valid_metric=True,\n    verbose=True,\n    load_best_on_end=True,\n    loggers={\"comet\": logger},\n)<\/pre>\n<h1 id=\"5c3e\" class=\"kz la jj bm lb lc mt le lf lg mu li lj lk mv lm ln lo mw lq lr ls mx lu lv lw ga\" data-selectable-paragraph=\"\">Getting Started<\/h1>\n<p id=\"3cfc\" class=\"pw-post-body-paragraph lx ly jj bm b lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms kq ir ga\" data-selectable-paragraph=\"\">Getting started with this integration is really easy \u2014<\/p>\n<p id=\"1eaf\" class=\"pw-post-body-paragraph lx ly jj bm b lz my mb mc md mz mf mg mh na mj mk ml nb mn mo mp nc mr ms kq ir ga\" data-selectable-paragraph=\"\">The following resources should help you start logging Catalyst runs to Comet in no time:<\/p>\n<ul class=\"\">\n<li id=\"cd2a\" class=\"nj nk jj bm b lz my md mz mh nl ml nm mp nn kq no np nq nr ga\" data-selectable-paragraph=\"\"><a class=\"au kr\" href=\"https:\/\/colab.research.google.com\/drive\/1TaG27HcMh2jyRKBGsqRXLiGUfsHVyCq6?usp=sharing\" target=\"_blank\" rel=\"noopener ugc nofollow\">Colab Notebook<\/a>&nbsp;\u2014 Our Notebook is ready to run, but you can also create a copy if you\u2019d like to modify it.<\/li>\n<li id=\"68ea\" class=\"nj nk jj bm b lz ns md nt mh nu ml nv mp nw kq no np nq nr ga\" data-selectable-paragraph=\"\"><a class=\"au kr\" href=\"https:\/\/github.com\/catalyst-team\/catalyst\" target=\"_blank\" rel=\"noopener ugc nofollow\">Catalyst GitHub Repo<\/a>&nbsp;\u2014 Need a crash course on Catalyst? Check out this GitHub repo for the basics and a whole lot more.<\/li>\n<li id=\"da0a\" class=\"nj nk jj bm b lz ns md nt mh nu ml nv mp nw kq no np nq nr ga\" data-selectable-paragraph=\"\"><a class=\"au kr\" href=\"https:\/\/www.comet.com\/site\/data-scientists\/?utm_campaign=tensorboardx-integration&amp;utm_source=website&amp;utm_medium=blog\" target=\"_blank\" rel=\"noopener ugc nofollow\">A free Comet account<\/a>: Building with Comet is absolutely free \u2014 unlimited public and private projects, 100GB of storage, hyperparameter search, and more.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"o dx ks kt id ku\" role=\"separator\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re excited to announce another excellent and powerful integration with Comet \u2014&nbsp;Catalyst! This integration allows you to leverage Comet\u2019s logging capabilities while using the Catalyst framework to structure your Deep Learning Experiment runs About Catalyst Catalyst&nbsp;is a PyTorch framework for Deep Learning R&amp;D. It focuses on reproducibility, rapid experimentation, and codebase reusability so you can [&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":[8,23,9],"tags":[],"coauthors":[128],"class_list":["post-4578","post","type-post","status-publish","format-standard","hentry","category-comet-community-hub","category-integrations","category-product"],"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>New Integration: Comet + Catalyst - Comet<\/title>\n<meta name=\"description\" content=\"We\u2019re excited to announce another excellent and powerful integration with Comet \u2014\u00a0Catalyst!\" \/>\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\/new-integration-comet-catalyst\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New Integration: Comet + Catalyst\" \/>\n<meta property=\"og:description\" content=\"We\u2019re excited to announce another excellent and powerful integration with Comet \u2014\u00a0Catalyst!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/\" \/>\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=\"2022-11-11T01:50:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T17:16:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png\" \/>\n<meta name=\"author\" content=\"Dhruv Nair\" \/>\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=\"Dhruv Nair\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"New Integration: Comet + Catalyst - Comet","description":"We\u2019re excited to announce another excellent and powerful integration with Comet \u2014\u00a0Catalyst!","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\/new-integration-comet-catalyst\/","og_locale":"en_US","og_type":"article","og_title":"New Integration: Comet + Catalyst","og_description":"We\u2019re excited to announce another excellent and powerful integration with Comet \u2014\u00a0Catalyst!","og_url":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/","og_site_name":"Comet","article_publisher":"https:\/\/www.facebook.com\/cometdotml","article_published_time":"2022-11-11T01:50:07+00:00","article_modified_time":"2025-04-24T17:16:31+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png","type":"","width":"","height":""}],"author":"Dhruv Nair","twitter_card":"summary_large_image","twitter_creator":"@Cometml","twitter_site":"@Cometml","twitter_misc":{"Written by":"Dhruv Nair","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#article","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/"},"author":{"name":"Team Comet Digital","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/6266601170c60a7a82b3e0043fbe8ddf"},"headline":"New Integration: Comet + Catalyst","datePublished":"2022-11-11T01:50:07+00:00","dateModified":"2025-04-24T17:16:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/"},"wordCount":275,"publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png","articleSection":["Comet Community Hub","Integrations","Product"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/","url":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/","name":"New Integration: Comet + Catalyst - Comet","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#primaryimage"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png","datePublished":"2022-11-11T01:50:07+00:00","dateModified":"2025-04-24T17:16:31+00:00","description":"We\u2019re excited to announce another excellent and powerful integration with Comet \u2014\u00a0Catalyst!","breadcrumb":{"@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#primaryimage","url":"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png","contentUrl":"https:\/\/miro.medium.com\/max\/700\/1*AhkXT8cR1_u7A38wzXW2ew.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.comet.com\/site\/blog\/new-integration-comet-catalyst\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.comet.com\/site\/"},{"@type":"ListItem","position":2,"name":"New Integration: Comet + Catalyst"}]},{"@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\/4578","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=4578"}],"version-history":[{"count":1,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/4578\/revisions"}],"predecessor-version":[{"id":15649,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/4578\/revisions\/15649"}],"wp:attachment":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/media?parent=4578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/categories?post=4578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/tags?post=4578"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/coauthors?post=4578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}