{"id":5649081,"date":"2023-10-13T11:01:40","date_gmt":"2023-10-13T15:01:40","guid":{"rendered":"https:\/\/lightning.ai\/pages\/?p=5649081"},"modified":"2023-10-18T14:35:28","modified_gmt":"2023-10-18T18:35:28","slug":"from-pytorch-to-pytorch-lighting-getting-started-guide","status":"publish","type":"post","link":"https:\/\/lightning.ai\/pages\/community\/from-pytorch-to-pytorch-lighting-getting-started-guide\/","title":{"rendered":"From PyTorch to PyTorch Lighting: Getting Started Guide"},"content":{"rendered":"<div class=\"takeaways card-glow p-4 my-4\"><h3 class=\"w-100 d-block\">Takeaways<\/h3>Learn how to simplify your deep learning projects and supercharge your research with cleaner code using PyTorch Lightning.<\/div>\n<p>If you&#8217;ve been working with PyTorch, you&#8217;re likely familiar with its power and flexibility in building and training deep learning models. However, as your projects become more complex and your codebase grows, you may find yourself spending a significant amount of time on boilerplate code for managing training loops, handling data loaders, and implementing common training procedures. This is where PyTorch Lightning comes to the rescue. In this blog, we&#8217;ll explore how to transition from traditional PyTorch to PyTorch Lightning and the benefits it offers.<\/p>\n<h2>What is PyTorch Lightning?<\/h2>\n<p>PyTorch Lightning is an open-source lightweight PyTorch wrapper that simplifies the training and evaluation of deep learning models. It abstracts away much of the repetitive code you would typically write, allowing you to focus on your model architecture and research. Some of the key benefits of PyTorch Lightning include:<\/p>\n<p>1. <b>Simplified Training Loop:<\/b> PyTorch Lightning provides a standard module called `LightningModule`, which abstracts the training loop. This makes your code more readable and less error-prone.<br \/>\n2. <b>Easy Experiment Management:<\/b> It offers integrations with popular experiment tracking tools like TensorBoard, WandB, and more, streamlining the process of monitoring and logging your experiments.<br \/>\n3. <b>Scalability:<\/b> PyTorch Lightning allows you to scale your training to multiple GPUs and enable mixed precision and lower precision training without any code change.<br \/>\n4. <b>Reproducibility:<\/b> PyTorch Lightning ensures reproducibility by fixing random seeds and handling distributed training setups seamlessly.<br \/>\n5. <b>Clean and Readable Code:<\/b> It promotes a clean and modular code structure, making it easier to collaborate on projects and maintain code.<\/p>\n<h2>Migrating from PyTorch to PyTorch Lightning<\/h2>\n<p>Moving from traditional PyTorch to PyTorch Lightning is a straightforward process. Here are the essential steps to get started:<\/p>\n<h3>1. Installation<\/h3>\n<p>First, make sure you have PyTorch and PyTorch Lightning installed. You can install them via pip:<\/p>\n<pre class=\"code-shortcode dark-theme window- collapse-false \" style=\"--height:falsepx\"><code class=\"language-python\"><br \/>\npip install torch<br \/>\npip install \"pytorch-lightning>=2.1.0\"<br \/>\n<\/code><div class=\"copy-button\"><button class=\"expand-button\">Expand<\/button><button class=\"copy\">Copy<\/button><\/div><\/pre>\n<h3>2. Refactor Your Training Loop<\/h3>\n<p>In your existing PyTorch code, you typically have a training loop that includes steps for forward and backward passes, gradient updates, and more. With PyTorch Lightning, you need to define your model and data loaders, and the framework takes care of the rest. Here&#8217;s a simple example of migrating from PyTorch to PyTorch Lightning:<\/p>\n<p><b>Traditional PyTorch Training Loop:<\/b><\/p>\n<pre class=\"code-shortcode dark-theme window- collapse-false \" style=\"--height:falsepx\"><code class=\"language-python\"><br \/>\n# Your typical PyTorch training loop<br \/>\nfor epoch in range(num_epochs):<br \/>\n    model.train()<br \/>\n    for batch in data_loader:<br \/>\n        inputs, labels = batch<br \/>\n        optimizer.zero_grad()<br \/>\n        outputs = model(inputs)<br \/>\n        loss = criterion(outputs, labels)<br \/>\n        loss.backward()<br \/>\n        optimizer.step()<br \/>\n<\/code><div class=\"copy-button\"><button class=\"expand-button\">Expand<\/button><button class=\"copy\">Copy<\/button><\/div><\/pre>\n<p><\/b>PyTorch Lightning Training Loop:<\/b><\/p>\n<pre class=\"code-shortcode dark-theme window- collapse-false \" style=\"--height:falsepx\"><code class=\"language-python\"><br \/>\nimport pytorch_lightning as pl\n\nclass YourLightningModule(pl.LightningModule):<br \/>\n    def __init__(self, model, criterion, optimizer):<br \/>\n        super().__init__()<br \/>\n        self.model = model<br \/>\n        self.criterion = criterion<br \/>\n        self.optimizer = optimizer\n\n    def forward(self, x):<br \/>\n        return self.model(x)\n\n    def training_step(self, batch, batch_idx):<br \/>\n        inputs, labels = batch<br \/>\n        outputs = self(inputs)<br \/>\n        loss = self.criterion(outputs, labels)<br \/>\n        return loss\n\n    def configure_optimizers(self):<br \/>\n        return self.optimizer\n\n# Initialize the LightningModule and LightningDataModule<br \/>\nmodel = YourLightningModule(model, criterion, optimizer)\n\n# Train the model using a Trainer<br \/>\ntrainer = pl.Trainer(gpus=1)<br \/>\ntrainer.fit(model, train_dataloader=train_dataloader)<br \/>\n<\/code><div class=\"copy-button\"><button class=\"expand-button\">Expand<\/button><button class=\"copy\">Copy<\/button><\/div><\/pre>\n<p>As you can see, PyTorch Lightning significantly simplifies the training loop, making it more modular and readable. You define your model and training step within a <code>LightningModule<\/code>, and the framework takes care of the rest. You can find a full training code <a href=\"https:\/\/github.com\/aniketmaurya\/deep-learning-examples\/blob\/main\/src\/distributed-training\/train.py\">here<\/a>.<\/p>\n<h3>3. Logging and Experiment Management<\/h3>\n<p>One of the benefits of PyTorch Lightning is its integration with various experiment tracking tools. You can easily set up logging for your experiments using these tools. For example, to use TensorBoard for logging, you can add the following lines to your <code>LightningModule<\/code>:<\/p>\n<pre class=\"code-shortcode dark-theme window- collapse-false \" style=\"--height:falsepx\"><code class=\"language-python\"><br \/>\nfrom pytorch_lightning.loggers import TensorBoardLogger\n\n# Initialize a TensorBoard logger<br \/>\nlogger = TensorBoardLogger(\"logs\/\")\n\n# Add it to your Trainer<br \/>\ntrainer = pl.Trainer(gpus=1, logger=logger)\n\n<\/code><div class=\"copy-button\"><button class=\"expand-button\">Expand<\/button><button class=\"copy\">Copy<\/button><\/div><\/pre>\n<p>This will create log files for your experiments that can be visualized using TensorBoard.<\/p>\n<h3>4. Distributed Training<\/h3>\n<p>If you need to train your models on multiple GPUs or even across multiple machines, PyTorch Lightning provides built-in support for distributed training. You can specify the number of GPUs in the <code>Trainer<\/code> and let PyTorch Lightning handle the distribution for you.<\/p>\n<pre class=\"code-shortcode dark-theme window- collapse-false \" style=\"--height:falsepx\"><code class=\"language-python\"><br \/>\ntrainer = pl.Trainer(gpus=2)<br \/>\n<\/code><div class=\"copy-button\"><button class=\"expand-button\">Expand<\/button><button class=\"copy\">Copy<\/button><\/div><\/pre>\n<h2>Conclusion<\/h2>\n<p>Transitioning from traditional PyTorch to PyTorch Lightning can greatly simplify your deep learning projects. It allows you to focus on your model and research, rather than spending time on boilerplate code. With its community support and extensive documentation, you&#8217;ll find that many common tasks and challenges are already addressed. So, if you want cleaner, more readable, and more maintainable code for your PyTorch projects, give PyTorch Lightning a try. It&#8217;s a powerful tool for taking your deep learning work to the next level.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been working with PyTorch, you&#8217;re likely familiar with its power and flexibility in building and training deep learning models. However, as your projects become more complex and your codebase grows, you may find yourself spending a significant amount of time on boilerplate code for managing training loops, handling data loaders, and implementing common<a class=\"excerpt-read-more\" href=\"https:\/\/lightning.ai\/pages\/community\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\" title=\"ReadFrom PyTorch to PyTorch Lighting: Getting Started Guide\">&#8230; Read more &raquo;<\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[106,41],"tags":[],"glossary":[],"acf":{"additional_authors":false,"mathjax":false,"default_editor":true,"show_table_of_contents":false,"hide_from_archive":false,"content_type":"Blog Post","sticky":false,"code_embed":false,"tabs":false,"custom_styles":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI\" \/>\n<meta property=\"og:description\" content=\"If you&#8217;ve been working with PyTorch, you&#8217;re likely familiar with its power and flexibility in building and training deep learning models. However, as your projects become more complex and your codebase grows, you may find yourself spending a significant amount of time on boilerplate code for managing training loops, handling data loaders, and implementing common... Read more &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Lightning AI\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-13T15:01:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-18T18:35:28+00:00\" \/>\n<meta name=\"author\" content=\"JP Hennessy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@LightningAI\" \/>\n<meta name=\"twitter:site\" content=\"@LightningAI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"JP Hennessy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\"},\"author\":{\"name\":\"JP Hennessy\",\"@id\":\"https:\/\/lightning.ai\/pages\/#\/schema\/person\/2518f4d5541f8e98016f6289169141a6\"},\"headline\":\"From PyTorch to PyTorch Lighting: Getting Started Guide\",\"datePublished\":\"2023-10-13T15:01:40+00:00\",\"dateModified\":\"2023-10-18T18:35:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\"},\"wordCount\":787,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/lightning.ai\/pages\/#organization\"},\"articleSection\":[\"Community\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\",\"url\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\",\"name\":\"From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI\",\"isPartOf\":{\"@id\":\"https:\/\/lightning.ai\/pages\/#website\"},\"datePublished\":\"2023-10-13T15:01:40+00:00\",\"dateModified\":\"2023-10-18T18:35:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lightning.ai\/pages\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"From PyTorch to PyTorch Lighting: Getting Started Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lightning.ai\/pages\/#website\",\"url\":\"https:\/\/lightning.ai\/pages\/\",\"name\":\"Lightning AI\",\"description\":\"The platform for teams to build AI.\",\"publisher\":{\"@id\":\"https:\/\/lightning.ai\/pages\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lightning.ai\/pages\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lightning.ai\/pages\/#organization\",\"name\":\"Lightning AI\",\"url\":\"https:\/\/lightning.ai\/pages\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lightning.ai\/pages\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lightningaidev.wpengine.com\/wp-content\/uploads\/2023\/02\/image-17.png\",\"contentUrl\":\"https:\/\/lightningaidev.wpengine.com\/wp-content\/uploads\/2023\/02\/image-17.png\",\"width\":1744,\"height\":856,\"caption\":\"Lightning AI\"},\"image\":{\"@id\":\"https:\/\/lightning.ai\/pages\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/LightningAI\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/lightning.ai\/pages\/#\/schema\/person\/2518f4d5541f8e98016f6289169141a6\",\"name\":\"JP Hennessy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lightning.ai\/pages\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/28ade268218ae45f723b0b62499f527a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/28ade268218ae45f723b0b62499f527a?s=96&d=mm&r=g\",\"caption\":\"JP Hennessy\"},\"url\":\"https:\/\/lightning.ai\/pages\/author\/jplightning-ai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI","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:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/","og_locale":"en_US","og_type":"article","og_title":"From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI","og_description":"If you&#8217;ve been working with PyTorch, you&#8217;re likely familiar with its power and flexibility in building and training deep learning models. However, as your projects become more complex and your codebase grows, you may find yourself spending a significant amount of time on boilerplate code for managing training loops, handling data loaders, and implementing common... Read more &raquo;","og_url":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/","og_site_name":"Lightning AI","article_published_time":"2023-10-13T15:01:40+00:00","article_modified_time":"2023-10-18T18:35:28+00:00","author":"JP Hennessy","twitter_card":"summary_large_image","twitter_creator":"@LightningAI","twitter_site":"@LightningAI","twitter_misc":{"Written by":"JP Hennessy","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#article","isPartOf":{"@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/"},"author":{"name":"JP Hennessy","@id":"https:\/\/lightning.ai\/pages\/#\/schema\/person\/2518f4d5541f8e98016f6289169141a6"},"headline":"From PyTorch to PyTorch Lighting: Getting Started Guide","datePublished":"2023-10-13T15:01:40+00:00","dateModified":"2023-10-18T18:35:28+00:00","mainEntityOfPage":{"@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/"},"wordCount":787,"commentCount":0,"publisher":{"@id":"https:\/\/lightning.ai\/pages\/#organization"},"articleSection":["Community","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/","url":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/","name":"From PyTorch to PyTorch Lighting: Getting Started Guide - Lightning AI","isPartOf":{"@id":"https:\/\/lightning.ai\/pages\/#website"},"datePublished":"2023-10-13T15:01:40+00:00","dateModified":"2023-10-18T18:35:28+00:00","breadcrumb":{"@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lightning.ai\/pages\/community\/tutorial\/from-pytorch-to-pytorch-lighting-getting-started-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lightning.ai\/pages\/"},{"@type":"ListItem","position":2,"name":"From PyTorch to PyTorch Lighting: Getting Started Guide"}]},{"@type":"WebSite","@id":"https:\/\/lightning.ai\/pages\/#website","url":"https:\/\/lightning.ai\/pages\/","name":"Lightning AI","description":"The platform for teams to build AI.","publisher":{"@id":"https:\/\/lightning.ai\/pages\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lightning.ai\/pages\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lightning.ai\/pages\/#organization","name":"Lightning AI","url":"https:\/\/lightning.ai\/pages\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lightning.ai\/pages\/#\/schema\/logo\/image\/","url":"https:\/\/lightningaidev.wpengine.com\/wp-content\/uploads\/2023\/02\/image-17.png","contentUrl":"https:\/\/lightningaidev.wpengine.com\/wp-content\/uploads\/2023\/02\/image-17.png","width":1744,"height":856,"caption":"Lightning AI"},"image":{"@id":"https:\/\/lightning.ai\/pages\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/LightningAI"]},{"@type":"Person","@id":"https:\/\/lightning.ai\/pages\/#\/schema\/person\/2518f4d5541f8e98016f6289169141a6","name":"JP Hennessy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lightning.ai\/pages\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/28ade268218ae45f723b0b62499f527a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/28ade268218ae45f723b0b62499f527a?s=96&d=mm&r=g","caption":"JP Hennessy"},"url":"https:\/\/lightning.ai\/pages\/author\/jplightning-ai\/"}]}},"_links":{"self":[{"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/posts\/5649081"}],"collection":[{"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/comments?post=5649081"}],"version-history":[{"count":0,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/posts\/5649081\/revisions"}],"wp:attachment":[{"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/media?parent=5649081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/categories?post=5649081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/tags?post=5649081"},{"taxonomy":"glossary","embeddable":true,"href":"https:\/\/lightning.ai\/pages\/wp-json\/wp\/v2\/glossary?post=5649081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}