{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Use W&B offline" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!wandb offline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## **Or** login using an API from your W&B account" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!wandb login" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Now you are set to run the demo!" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "AqSj5JwRz_Lw", "outputId": "4c299831-6279-430e-ca8e-f2a58e8f4720" }, "outputs": [], "source": "import subprocess\nimport sys\n\nprocess = subprocess.Popen(\n [\n \"uvx\",\n \"--refresh\",\n \"--from\",\n \"mjlab==1.2.0\",\n \"demo\",\n ],\n stdout=subprocess.PIPE,\n stderr=subprocess.STDOUT,\n universal_newlines=True,\n bufsize=1,\n)\n\nfor line in process.stdout:\n print(line, end=\"\")\n sys.stdout.flush()\n\n if \"serving\" in line.lower() or \"running on\" in line.lower() or \"8081\" in line:\n print(\"\\n\" + \"=\" * 50)\n print(\"✅ Server is running! Execute the next cell to view.\")\n print(\"=\" * 50)\n break" }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 421 }, "id": "i7xycbkt1MFB", "outputId": "7fae85cc-1678-4f59-f700-688fbdc6fb84" }, "outputs": [], "source": [ "from google.colab import output\n", "\n", "output.serve_kernel_port_as_iframe(8081)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "1IhDzu_i1uQt" }, "outputs": [], "source": [] } ], "metadata": { "accelerator": "GPU", "colab": { "gpuType": "T4", "provenance": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }