From a28db9592eea399b03322837d299cba79bae134e Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:59:51 -0700 Subject: [PATCH] Removed outputs, cleaned notebook w/ nb-clean --- colabs/intro/Report_API_Quickstart.ipynb | 2139 +--------------------- 1 file changed, 72 insertions(+), 2067 deletions(-) diff --git a/colabs/intro/Report_API_Quickstart.ipynb b/colabs/intro/Report_API_Quickstart.ipynb index cb4befe1..3855fa85 100644 --- a/colabs/intro/Report_API_Quickstart.ipynb +++ b/colabs/intro/Report_API_Quickstart.ipynb @@ -2,19 +2,14 @@ "cells": [ { "cell_type": "markdown", - "metadata": { - "colab_type": "text", - "id": "view-in-github" - }, + "metadata": {}, "source": [ "\"Open" ] }, { "cell_type": "markdown", - "metadata": { - "id": "cPVgUCLA7NDN" - }, + "metadata": {}, "source": [ "\"Weights\n", "" @@ -22,9 +17,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "notdNrjvIn2O" - }, + "metadata": {}, "source": [ "## 📝 W&B Report API\n", "Programmatically create, manage, and customize Reports by defining configurations, panel layouts, and runsets with the wandb-workspaces W&B library. Load and modify Reports with URLs, filter and group runs using expressions, and customize run appearances using Report templates.\n", @@ -36,10 +29,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": { - "id": "S1e3tnre7NDO" - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "#install dependencies\n", @@ -48,1660 +39,9 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": { - "id": "9UGFOwXG7NDO" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mnoahluna\u001b[0m. Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n" - ] - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084128-2y8hbgby" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run adventurous-aardvark-1 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/report-api-quickstart" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/report-api-quickstart/runs/2y8hbgby" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 3.4% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "\n", - "

Run history:


acc▁▃▄▄▅▅▆▆▅▆▅▆▆▇▆▆▇▆▇▆▇▆▇▇▇▆██▇▇▇▇▇█▇▇█▇▇▇
loss█▆▄▅▄▄▄▄▄▄▃▃▂▃▃▃▂▂▂▂▃▂▂▂▂▂▁▂▂▂▂▂▂▁▁▁▁▁▂▂
val_acc▁▃▃▄▄▅▅▅▅▆▆▅▆▆▆▇▇▇▆▇▇▆▆▇█▇▆█▆▇█▇▇▇██▇▇▇█
val_loss█▇▅▅▄▄▄▄▄▄▄▃▃▃▃▃▂▃▃▃▂▂▂▂▂▂▂▂▂▁▁▂▂▂▂▂▁▂▁▂

Run summary:


acc3.4914
loss-0.01171
val_acc3.12969
val_loss0.05273

" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run adventurous-aardvark-1 at: https://wandb.ai/noahluna/report-api-quickstart/runs/2y8hbgby
View project at: https://wandb.ai/noahluna/report-api-quickstart
Synced 4 W&B file(s), 0 media file(s), 4 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084128-2y8hbgby/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084135-cko2fnwe" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run bountiful-badger-2 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/report-api-quickstart" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/report-api-quickstart/runs/cko2fnwe" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 58.5% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "\n", - "

Run history:


acc▁▃▃▅▅▅▆▅▆▆▆▅▆▆▆▆▆▆▆▇▆▇▇▆▇▇▇▇▇▇▇▇▇██▇███▇
loss█▆▆▅▅▅▄▃▃▃▃▃▃▃▂▂▃▃▂▂▂▂▂▂▂▃▂▂▂▂▂▂▂▂▂▂▁▂▂▁
val_acc▁▂▄▄▅▅▅▅▆▆▆▆▆▅▆▆▆▇▇▆▆▇▇▇▇▇▇▇▇█▇▇▇▇▇▇█▇█▇
val_loss█▇▆▆▄▄▄▃▄▄▄▃▃▃▃▃▃▃▃▂▃▃▂▃▂▃▃▂▁▂▁▁▂▁▁▂▁▂▂▂

Run summary:


acc3.88925
loss0.14258
val_acc3.12525
val_loss0.1342

" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run bountiful-badger-2 at: https://wandb.ai/noahluna/report-api-quickstart/runs/cko2fnwe
View project at: https://wandb.ai/noahluna/report-api-quickstart
Synced 4 W&B file(s), 0 media file(s), 2 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084135-cko2fnwe/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084142-z5ept0jf" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run clairvoyant-chipmunk-3 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/report-api-quickstart" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/report-api-quickstart/runs/z5ept0jf" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 58.5% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "\n", - "

Run history:


acc▁▃▃▅▄▄▅▅▅▆▆▆▆▅▇▆▇▆▇▇▆▇▇▇▇▇█▇▇██▇▇▇█▇█▇██
loss█▇▆▆▄▅▅▄▃▄▄▄▄▄▄▃▄▄▃▂▂▃▂▃▂▂▂▂▃▂▂▃▁▂▂▂▂▂▁▁
val_acc▁▂▄▄▄▄▅▅▅▅▆▆▅▇▆▆▆▆▆▇▇▇▇█▇▇█▇▇█▇▇█▇▇▇██▇█
val_loss█▇▅▅▅▅▄▄▄▄▃▃▃▄▃▃▃▂▂▂▃▂▃▂▂▂▁▂▂▁▂▂▂▂▂▁▁▂▁▁

Run summary:


acc3.71657
loss0.05718
val_acc3.41874
val_loss0.06552

" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run clairvoyant-chipmunk-3 at: https://wandb.ai/noahluna/report-api-quickstart/runs/z5ept0jf
View project at: https://wandb.ai/noahluna/report-api-quickstart
Synced 4 W&B file(s), 0 media file(s), 2 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084142-z5ept0jf/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084150-5128m41p" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run dastardly-duck-4 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/report-api-quickstart" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/report-api-quickstart/runs/5128m41p" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 58.5% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "\n", - "

Run history:


acc▁▃▄▅▅▅▅▅▆▆▆▆▆▆▇▆▆▆▆▆▇▆▆▇▇▆▇▇▇▇▇█▇█▇████▇
loss█▅▅▅▄▄▄▄▃▃▃▃▃▂▃▃▂▃▂▃▂▂▂▂▂▂▂▁▂▂▁▁▁▂▂▁▂▁▂▂
val_acc▁▂▄▄▄▅▅▅▆▅▅▅▆▆▆▇▆▇▆▆▇▇▇▇▆▆█▇▇█████▇▇▇█▇█
val_loss█▆▇▅▅▅▄▄▄▄▃▄▃▃▃▃▄▃▃▃▂▃▂▂▂▃▂▂▂▁▂▁▁▂▂▂▂▂▂▁

Run summary:


acc3.18347
loss0.06381
val_acc2.67917
val_loss0.06745

" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run dastardly-duck-4 at: https://wandb.ai/noahluna/report-api-quickstart/runs/5128m41p
View project at: https://wandb.ai/noahluna/report-api-quickstart
Synced 4 W&B file(s), 0 media file(s), 2 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084150-5128m41p/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084157-lg5pf11v" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run eloquent-elephant-5 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/report-api-quickstart" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/report-api-quickstart/runs/lg5pf11v" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 4.8% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run eloquent-elephant-5 at: https://wandb.ai/noahluna/report-api-quickstart/runs/lg5pf11v
View project at: https://wandb.ai/noahluna/report-api-quickstart
Synced 4 W&B file(s), 2 media file(s), 6 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084157-lg5pf11v/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084207-xfnt9t2m" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run hopeful-planet-33 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/xfnt9t2m" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 94.6% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run hopeful-planet-33 at: https://wandb.ai/noahluna/lineage-example/runs/xfnt9t2m
View project at: https://wandb.ai/noahluna/lineage-example
Synced 4 W&B file(s), 0 media file(s), 13 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084207-xfnt9t2m/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084221-ny73rk0c" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run brisk-cosmos-34 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/ny73rk0c" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 97.8% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run brisk-cosmos-34 at: https://wandb.ai/noahluna/lineage-example/runs/ny73rk0c
View project at: https://wandb.ai/noahluna/lineage-example
Synced 4 W&B file(s), 0 media file(s), 11 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084221-ny73rk0c/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084237-33c3lxip" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run apricot-wind-35 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/33c3lxip" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 97.8% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run apricot-wind-35 at: https://wandb.ai/noahluna/lineage-example/runs/33c3lxip
View project at: https://wandb.ai/noahluna/lineage-example
Synced 4 W&B file(s), 0 media file(s), 11 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084237-33c3lxip/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084250-jws4kl6t" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run solar-disco-36 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/jws4kl6t" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 78.6% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run solar-disco-36 at: https://wandb.ai/noahluna/lineage-example/runs/jws4kl6t
View project at: https://wandb.ai/noahluna/lineage-example
Synced 5 W&B file(s), 0 media file(s), 14 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084250-jws4kl6t/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084304-ocj3j12m" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run dulcet-plant-37 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/ocj3j12m" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 90.0% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run dulcet-plant-37 at: https://wandb.ai/noahluna/lineage-example/runs/ocj3j12m
View project at: https://wandb.ai/noahluna/lineage-example
Synced 5 W&B file(s), 0 media file(s), 11 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084304-ocj3j12m/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084317-crqgfjhh" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run spring-moon-38 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/crqgfjhh" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 90.0% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run spring-moon-38 at: https://wandb.ai/noahluna/lineage-example/runs/crqgfjhh
View project at: https://wandb.ai/noahluna/lineage-example
Synced 5 W&B file(s), 0 media file(s), 11 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084317-crqgfjhh/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084333-2pwaqwvo" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run magic-water-39 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/2pwaqwvo" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 90.0% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run magic-water-39 at: https://wandb.ai/noahluna/lineage-example/runs/2pwaqwvo
View project at: https://wandb.ai/noahluna/lineage-example
Synced 5 W&B file(s), 0 media file(s), 11 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084333-2pwaqwvo/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "wandb version 0.17.7 is available! To upgrade, please run:\n", - " $ pip install wandb --upgrade" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Tracking run with wandb version 0.17.4" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Run data is saved locally in /Users/noahluna/Documents/GitHub/examples/wandb/run-20240821_084346-z4gsqxc0" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Syncing run proud-sea-40 to Weights & Biases (docs)
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View project at https://wandb.ai/noahluna/lineage-example" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run at https://wandb.ai/noahluna/lineage-example/runs/z4gsqxc0" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "W&B sync reduced upload amount by 76.9% " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " View run proud-sea-40 at: https://wandb.ai/noahluna/lineage-example/runs/z4gsqxc0
View project at: https://wandb.ai/noahluna/lineage-example
Synced 5 W&B file(s), 0 media file(s), 5 artifact file(s) and 1 other file(s)" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "Find logs at: ./wandb/run-20240821_084346-z4gsqxc0/logs" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "The new W&B backend becomes opt-out in version 0.18.0; try it out with `wandb.require(\"core\")`! See https://wandb.me/wandb-core for more information." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "#@title ## Log Runs { run: \"auto\", display-mode: \"form\" }\n", "#@markdown If this is your first time here, consider running the setup code for a better docs experience!\n", @@ -1912,9 +252,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "4tqli7A_7NDP" - }, + "metadata": {}, "source": [ "\n", "# 🚀 Quickstart! " @@ -1922,10 +260,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": { - "id": "EmDzg3wS7NDP" - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "import wandb_workspaces.reports.v2 as wr" @@ -1933,9 +269,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "eheAid__7NDP" - }, + "metadata": {}, "source": [ "## Create, save, and load reports\n", "- NOTE: Reports are not saved automatically to reduce clutter. Explicitly save the report by calling `report.save()`" @@ -1943,32 +277,9 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": { - "id": "RVlOoOaK7NDP" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTY5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='readable', description='That was easy!', id='Vmlldzo5MTA1NTY5')" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report = wr.Report(\n", " project=PROJECT,\n", @@ -1981,9 +292,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "d3M7hocj7NDP" - }, + "metadata": {}, "source": [ "## Add content via blocks\n", "- Use blocks to add content like text, images, code, and more\n", @@ -1992,32 +301,9 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "id": "ZaSE1j897NDP" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTY5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='readable', description='That was easy!', blocks=[TableOfContents(), H1(text='Text and images example'), P(text='Lorem ipsum dolor sit amet. Aut laborum perspiciatis sit odit omnis aut aliquam voluptatibus ut rerum molestiae sed assumenda nulla ut minus illo sit sunt explicabo? Sed quia architecto est voluptatem magni sit molestiae dolores. Non animi repellendus ea enim internos et iste itaque quo labore mollitia aut omnis totam.'), Image(url='https://api.wandb.ai/files/telidavies/images/projects/831572/8ad61fd1.png', caption='Craiyon generated images'), P(text='Et voluptatem galisum quo facilis sequi quo suscipit sunt sed iste iure! Est voluptas adipisci et doloribus commodi ab tempore numquam qui tempora adipisci. Eum sapiente cupiditate ut natus aliquid sit dolor consequatur?')], id='Vmlldzo5MTA1NTY5')" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report.blocks = [\n", " wr.TableOfContents(),\n", @@ -2031,9 +317,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "bMNTXROu7NDQ" - }, + "metadata": {}, "source": [ "## Add charts and more via Panel Grid\n", "- `PanelGrid` is a special type of block that holds `runsets` and `panels`\n", @@ -2043,32 +327,9 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "id": "2lpA3H4R7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTY5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='readable', description='That was easy!', blocks=[TableOfContents(), H1(text='Panel Grid Example'), PanelGrid(runsets=[Runset(entity='noahluna', project='report-api-quickstart', name='First Run Set', order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='noahluna', project='report-api-quickstart', name='Elephants Only!', query='elephant', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(x='Step', y=['val_acc'], smoothing_factor=0.8, layout=Layout(x=0, y=0, w=8, h=6)), BarPlot(metrics=['acc'], orientation='h', layout=Layout(x=8, y=0, w=8, h=6)), MediaBrowser(num_columns=1, media_keys=['img'], layout=Layout(x=16, y=0, w=8, h=6)), RunComparer(diff_only='split', layout=Layout(x=0, y=6, w=24, h=9))], active_runset=0), H1(text='Text and images example'), P(text='Lorem ipsum dolor sit amet. Aut laborum perspiciatis sit odit omnis aut aliquam voluptatibus ut rerum molestiae sed assumenda nulla ut minus illo sit sunt explicabo? Sed quia architecto est voluptatem magni sit molestiae dolores. Non animi repellendus ea enim internos et iste itaque quo labore mollitia aut omnis totam.'), Image(url='https://api.wandb.ai/files/telidavies/images/projects/831572/8ad61fd1.png', caption='Craiyon generated images'), P(text='Et voluptatem galisum quo facilis sequi quo suscipit sunt sed iste iure! Est voluptas adipisci et doloribus commodi ab tempore numquam qui tempora adipisci. Eum sapiente cupiditate ut natus aliquid sit dolor consequatur?')], id='Vmlldzo5MTA1NTY5')" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "pg = wr.PanelGrid(\n", " runsets=[\n", @@ -2089,9 +350,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "fbtBNA5k7NDQ" - }, + "metadata": {}, "source": [ "## Add data lineage with Artifact blocks\n", "- There are equivalent weave panels as well" @@ -2099,32 +358,9 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "id": "rI-kgZpU7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTY5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='readable', description='That was easy!', blocks=[TableOfContents(), H1(text='Artifact lineage example'), WeaveBlockArtifact(entity='noahluna', project='lineage-example', artifact='model-1', tab='lineage'), H1(text='Panel Grid Example'), PanelGrid(runsets=[Runset(entity='noahluna', project='report-api-quickstart', name='First Run Set', order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='noahluna', project='report-api-quickstart', name='Elephants Only!', query='elephant', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(x='Step', y=['val_acc'], smoothing_factor=0.8, layout=Layout(x=0, y=0, w=8, h=6)), BarPlot(metrics=['acc'], orientation='h', layout=Layout(x=8, y=0, w=8, h=6)), MediaBrowser(num_columns=1, media_keys=['img'], layout=Layout(x=16, y=0, w=8, h=6)), RunComparer(diff_only='split', layout=Layout(x=0, y=6, w=24, h=9))], active_runset=0), H1(text='Text and images example'), P(text='Lorem ipsum dolor sit amet. Aut laborum perspiciatis sit odit omnis aut aliquam voluptatibus ut rerum molestiae sed assumenda nulla ut minus illo sit sunt explicabo? Sed quia architecto est voluptatem magni sit molestiae dolores. Non animi repellendus ea enim internos et iste itaque quo labore mollitia aut omnis totam.'), Image(url='https://api.wandb.ai/files/telidavies/images/projects/831572/8ad61fd1.png', caption='Craiyon generated images'), P(text='Et voluptatem galisum quo facilis sequi quo suscipit sunt sed iste iure! Est voluptas adipisci et doloribus commodi ab tempore numquam qui tempora adipisci. Eum sapiente cupiditate ut natus aliquid sit dolor consequatur?')], id='Vmlldzo5MTA1NTY5')" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "artifact_lineage = wr.WeaveBlockArtifact(entity=ENTITY, project=LINEAGE_PROJECT, artifact='model-1', tab='lineage')\n", "\n", @@ -2134,9 +370,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "b2mMLGUK7NDQ" - }, + "metadata": {}, "source": [ "## Customize run colors\n", "- Pass in a `dict[run_name, color]`" @@ -2144,32 +378,9 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "id": "kE72SArq7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTY5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='readable', description='That was easy!', blocks=[TableOfContents(), H1(text='Artifact lineage example'), WeaveBlockArtifact(entity='noahluna', project='lineage-example', artifact='model-1', tab='lineage'), H1(text='Panel Grid Example'), PanelGrid(runsets=[Runset(entity='noahluna', project='report-api-quickstart', name='First Run Set', order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='noahluna', project='report-api-quickstart', name='Elephants Only!', query='elephant', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(x='Step', y=['val_acc'], smoothing_factor=0.8, layout=Layout(x=0, y=0, w=8, h=6)), BarPlot(metrics=['acc'], orientation='h', layout=Layout(x=8, y=0, w=8, h=6)), MediaBrowser(num_columns=1, media_keys=['img'], layout=Layout(x=16, y=0, w=8, h=6)), RunComparer(diff_only='split', layout=Layout(x=0, y=6, w=24, h=9))], active_runset=0, custom_run_colors={'adventurous-aardvark-1': '#e84118', 'bountiful-badger-2': '#fbc531', 'clairvoyant-chipmunk-3': '#4cd137', 'dastardly-duck-4': '#00a8ff', 'eloquent-elephant-5': '#9c88ff'}), H1(text='Text and images example'), P(text='Lorem ipsum dolor sit amet. Aut laborum perspiciatis sit odit omnis aut aliquam voluptatibus ut rerum molestiae sed assumenda nulla ut minus illo sit sunt explicabo? Sed quia architecto est voluptatem magni sit molestiae dolores. Non animi repellendus ea enim internos et iste itaque quo labore mollitia aut omnis totam.'), Image(url='https://api.wandb.ai/files/telidavies/images/projects/831572/8ad61fd1.png', caption='Craiyon generated images'), P(text='Et voluptatem galisum quo facilis sequi quo suscipit sunt sed iste iure! Est voluptas adipisci et doloribus commodi ab tempore numquam qui tempora adipisci. Eum sapiente cupiditate ut natus aliquid sit dolor consequatur?')], id='Vmlldzo5MTA1NTY5')" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "pg.custom_run_colors = {\n", " 'adventurous-aardvark-1': '#e84118',\n", @@ -2183,18 +394,14 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "pqu2LPgz7NDQ" - }, + "metadata": {}, "source": [ "# ❓ FAQ " ] }, { "cell_type": "markdown", - "metadata": { - "id": "c--gAdKg7NDQ" - }, + "metadata": {}, "source": [ "## My report is too wide/narrow\n", "- Change the report's width to the right size for you." @@ -2202,33 +409,9 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "id": "RQrUg8E17NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTcw\n", - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Quickstart-Report--Vmlldzo5MTA1NTcw\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Quickstart Report', width='fluid', description='That was easy!', blocks=[TableOfContents(), H1(text='Artifact lineage example'), WeaveBlockArtifact(entity='noahluna', project='lineage-example', artifact='model-1', tab='lineage'), H1(text='Panel Grid Example'), PanelGrid(runsets=[Runset(entity='noahluna', project='report-api-quickstart', name='First Run Set', order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='noahluna', project='report-api-quickstart', name='Elephants Only!', query='elephant', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(x='Step', y=['val_acc'], smoothing_factor=0.8, layout=Layout(x=0, y=0, w=8, h=6)), BarPlot(metrics=['acc'], orientation='h', layout=Layout(x=8, y=0, w=8, h=6)), MediaBrowser(num_columns=1, media_keys=['img'], layout=Layout(x=16, y=0, w=8, h=6)), RunComparer(diff_only='split', layout=Layout(x=0, y=6, w=24, h=9))], active_runset=0, custom_run_colors={'adventurous-aardvark-1': '#e84118', 'bountiful-badger-2': '#fbc531', 'clairvoyant-chipmunk-3': '#4cd137', 'dastardly-duck-4': '#00a8ff', 'eloquent-elephant-5': '#9c88ff'}), H1(text='Text and images example'), P(text='Lorem ipsum dolor sit amet. Aut laborum perspiciatis sit odit omnis aut aliquam voluptatibus ut rerum molestiae sed assumenda nulla ut minus illo sit sunt explicabo? Sed quia architecto est voluptatem magni sit molestiae dolores. Non animi repellendus ea enim internos et iste itaque quo labore mollitia aut omnis totam.'), Image(url='https://api.wandb.ai/files/telidavies/images/projects/831572/8ad61fd1.png', caption='Craiyon generated images'), P(text='Et voluptatem galisum quo facilis sequi quo suscipit sunt sed iste iure! Est voluptas adipisci et doloribus commodi ab tempore numquam qui tempora adipisci. Eum sapiente cupiditate ut natus aliquid sit dolor consequatur?')], id='Vmlldzo5MTA1NTcw')" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report2 = report.save(clone=True)\n", "report2.width = 'fluid'\n", @@ -2237,9 +420,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "ZBRQ0-Np7NDQ" - }, + "metadata": {}, "source": [ "## How do I resize panels?\n", "- Pass a `dict[dim, int]` to `panel.layout`\n", @@ -2250,32 +431,9 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "id": "83rhYSSD7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Resizing-panels--Vmlldzo5MTA1NTcy\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Resizing panels', width='readable', description='Look at this wide parallel coordinates plot!', blocks=[PanelGrid(runsets=[Runset(name='Run set', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[ParallelCoordinatesPlot(columns=[ParallelCoordinatesPlotColumn(metric='Step'), ParallelCoordinatesPlotColumn(metric='c::model'), ParallelCoordinatesPlotColumn(metric='c::optimizer'), ParallelCoordinatesPlotColumn(metric='Step'), ParallelCoordinatesPlotColumn(metric='val_acc'), ParallelCoordinatesPlotColumn(metric='val_loss')], layout=Layout(x=0, y=0, w=24, h=9))], active_runset=0)], id='Vmlldzo5MTA1NTcy')" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "import wandb_workspaces.reports.v2 as wr\n", "\n", @@ -2309,9 +467,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "qQTtzZ9r7NDQ" - }, + "metadata": {}, "source": [ "## What blocks are available?\n", "- See `wr.blocks` for a list of blocks.\n", @@ -2320,32 +476,9 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "id": "valQfFTQ7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/W&B-Block-Gallery--Vmlldzo5MTA1NTcz\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='W&B Block Gallery', width='readable', description='Check out all of the blocks available in W&B', blocks=[H1(text='Heading 1'), P(text='Normal paragraph'), H2(text='Heading 2'), P(text=['here is some text, followed by', InlineCode(text='select * from code in line'), 'and then latex', InlineLatex(text='e=mc^2')]), H3(text='Heading 3'), CodeBlock(code='this:\\n- is\\n- a\\ncool:\\n- yaml\\n- file', language='yaml'), WeaveBlockSummaryTable(entity='noahluna', project='report-api-quickstart', table_name='my-table'), WeaveBlockArtifact(entity='noahluna', project='lineage-example', artifact='model-1', tab='lineage'), WeaveBlockArtifactVersionedFile(entity='noahluna', project='lineage-example', artifact='model-1', version='v0', file='dataframe.table.json'), MarkdownBlock(text='Markdown cell with *italics* and **bold** and $e=mc^2$'), LatexBlock(text='\\\\gamma^2+\\\\theta^2=\\\\omega^2\\n\\\\\\\\ a^2 + b^2 = c^2'), Image(url='https://api.wandb.ai/files/megatruong/images/projects/918598/350382db.gif', caption=\"It's a me, Pikachu\"), UnorderedList(items=['Bullet 1', 'Bullet 2']), OrderedList(items=['Ordered 1', 'Ordered 2']), CheckedList(items=[CheckedListItem(text='Unchecked', checked=False), CheckedListItem(text='Checked', checked=True)]), BlockQuote(text='Block Quote 1\\nBlock Quote 2\\nBlock Quote 3'), CalloutBlock(text='Callout 1\\nCallout 2\\nCallout 3'), HorizontalRule(), Video(url='https://www.youtube.com/embed/6riDJMI-Y8U')], id='Vmlldzo5MTA1NTcz')" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report = wr.Report(\n", " project=PROJECT,\n", @@ -2407,9 +540,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "-koIg4Dp7NDQ" - }, + "metadata": {}, "source": [ "## What panels are available?\n", "- See `wr.panels` for a list of panels\n", @@ -2419,32 +550,9 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "id": "E95cCJQK7NDQ" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/W&B-Panel-Gallery--Vmlldzo5MTA1NTc0\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='W&B Panel Gallery', width='fluid', description='Check out all of the panels available in W&B', blocks=[PanelGrid(runsets=[Runset(project='lineage-example', name='Run set', order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(name='Run set', order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[MediaBrowser(media_keys=['img'], layout=Layout(x=0, y=0, w=8, h=6)), MarkdownPanel(markdown='Hello *italic* **bold** $e=mc^2$ `something`', layout=Layout(x=8, y=0, w=8, h=6)), LinePlot(title='Validation Accuracy over Time', x='Step', y=['val_acc'], range_x=(0.0, 1000.0), range_y=(1.0, 4.0), log_x=True, log_y=False, title_x='Training steps', title_y='Validation Accuracy', ignore_outliers=True, groupby='encoder', groupby_aggfunc='mean', groupby_rangefunc='minmax', smoothing_factor=0.5, smoothing_type='gaussian', smoothing_show_original=True, max_runs_to_show=10, font_size='large', legend_position='west', layout=Layout(x=16, y=0, w=8, h=6)), ScatterPlot(title='Validation Accuracy vs. Validation Loss', x='val_acc', y='val_loss', log_x=False, log_y=False, running_ymin=True, running_ymax=True, running_ymean=True, font_size='small', regression=True, layout=Layout(x=0, y=6, w=8, h=6)), BarPlot(title='Validation Loss by Encoder', metrics=['val_loss'], orientation='h', range_x=(0.0, 0.11), title_x='Validation Loss', groupby='encoder', groupby_aggfunc='median', groupby_rangefunc='stddev', max_runs_to_show=20, max_bars_to_show=3, font_size='auto', layout=Layout(x=8, y=6, w=8, h=6)), ScalarChart(title='Maximum Number of Steps', metric='Step', groupby_aggfunc='max', groupby_rangefunc='stderr', font_size='large', layout=Layout(x=16, y=6, w=8, h=6)), CodeComparer(diff='split', layout=Layout(x=0, y=12, w=8, h=6)), ParallelCoordinatesPlot(columns=[ParallelCoordinatesPlotColumn(metric='Step'), ParallelCoordinatesPlotColumn(metric='c::model'), ParallelCoordinatesPlotColumn(metric='c::optimizer'), ParallelCoordinatesPlotColumn(metric='val_acc'), ParallelCoordinatesPlotColumn(metric='val_loss')], layout=Layout(x=8, y=12, w=8, h=6)), ParameterImportancePlot(with_respect_to='val_loss', layout=Layout(x=16, y=12, w=8, h=6)), RunComparer(diff_only=True, layout=Layout(x=0, y=18, w=8, h=6)), CustomChart(query={'summary': ['val_loss', 'val_acc'], 'id': None, 'name': None}, chart_name='wandb/scatter/v0', chart_fields={'x': 'val_loss', 'y': 'val_acc'}, layout=Layout(x=8, y=18, w=8, h=6))], active_runset=0), WeaveBlockSummaryTable(entity='your_entity', project='your_project', table_name='my-table'), WeaveBlockArtifact(entity='your_entity', project='your_project', artifact='model-1', tab='lineage'), WeaveBlockArtifactVersionedFile(entity='your_entity', project='your_project', artifact='model-1', version='v0', file='dataframe.table.json')], id='Vmlldzo5MTA1NTc0')" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "import wandb_workspaces.reports.v2 as wr\n", "\n", @@ -2562,9 +670,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "_ImXrBtN7NDR" - }, + "metadata": {}, "source": [ "## How can I link related reports together?\n", "- Suppose have have two reports like below:" @@ -2572,33 +678,9 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": { - "id": "ueOH3zoS7NDR" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Report-1--Vmlldzo5MTA1NTc1\n", - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Report-2--Vmlldzo5MTA1NTc3\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Report 2', width='readable', description='Great content coming from Report 2', blocks=[H1(text='Heading from Report 2'), P(text='Est quod ducimus ut distinctio corruptiid optio qui cupiditate quibusdam ea corporis modi. Eum architecto vero sed error dignissimosEa repudiandae a recusandae sint ut sint molestiae ea pariatur quae. In pariatur voluptas ad facere neque 33 suscipit et odit nostrum ut internos molestiae est modi enim. Et rerum inventoreAut internos et dolores delectus aut Quis sunt sed nostrum magnam ab dolores dicta.'), PanelGrid(runsets=[Runset(entity='openrlbenchmark', project='cleanrl', name='DQN', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.8', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.88', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(title='SPS', x='global_step', y=['charts/SPS'], layout=Layout(x=0, y=0, w=8, h=6)), LinePlot(title='Episodic Length', x='global_step', y=['charts/episodic_length'], layout=Layout(x=8, y=0, w=8, h=6)), LinePlot(title='Episodic Return', x='global_step', y=['charts/episodic_return'], layout=Layout(x=16, y=0, w=8, h=6))], active_runset=0, custom_run_colors={RunsetGroup(runset_name='DQN', keys=(RunsetGroupKey(key='dqn_atari', value='exp_name'),)): '#e84118', RunsetGroup(runset_name='SAC-discrete 0.8', keys=(RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#fbc531', RunsetGroup(runset_name='SAC-discrete 0.88', keys=(RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#00a8ff'})], id='Vmlldzo5MTA1NTc3')" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "import wandb_workspaces.reports.v2 as wr\n", "\n", @@ -2704,41 +786,16 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "NOhlK4G47NDR" - }, + "metadata": {}, "source": [ "### Combine blocks into a new report" ] }, { "cell_type": "code", - "execution_count": 14, - "metadata": { - "id": "vfRryyUM7NDR" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Report-with-links--Vmlldzo5MTA1NTc4\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Report with links', width='readable', description='Use `wr.Link(text, url)` to add links inside normal text, or use normal markdown syntax in a MarkdownBlock', blocks=[H1(text='This is a normal heading'), P(text='And here is some normal text'), H1(text=['This is a heading ', Link(text='with a link!', url='https://wandb.ai/')]), P(text=['Most text formats support ', Link(text='adding links', url='https://wandb.ai/')]), MarkdownBlock(text='You can also use markdown syntax for [links](https://wandb.ai/)')], id='Vmlldzo5MTA1NTc4')" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report = wr.Report(PROJECT,\n", " title=\"Report with links\",\n", @@ -2758,32 +815,9 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": { - "id": "9GWSIsVp7NDU" - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/noahluna/report-api-quickstart/reports/Combined-blocks-report--Vmlldzo5MTA1NTc5\n" - ] - }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "Report(project='report-api-quickstart', entity='noahluna', title='Combined blocks report', width='readable', description='This report combines blocks from both Report 1 and Report 2', blocks=[H1(text='Heading from Report 1'), P(text='Lorem ipsum dolor sit amet. Aut fuga minus nam vero saepeA aperiam eum omnis dolorum et ducimus tempore aut illum quis aut alias vero. Sed explicabo illum est eius quianon vitae sed voluptatem incidunt. Vel architecto assumenda Ad voluptatem quo dicta provident et velit officia. Aut galisum inventoreSed dolore a illum adipisci a aliquam quidem sit corporis quia cum magnam similique.'), PanelGrid(runsets=[Runset(entity='openrlbenchmark', project='cleanrl', name='Run set', query='bigfish', groupby=['env_id', 'exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(title='Episodic Return', x='global_step', y=['charts/episodic_return'], groupby_aggfunc='mean', groupby_rangefunc='minmax', smoothing_factor=0.85, layout=Layout(x=0, y=0, w=12, h=8)), MediaBrowser(num_columns=4, media_keys=['videos'], layout=Layout(x=12, y=0, w=12, h=8))], active_runset=0, custom_run_colors={RunsetGroup(runset_name='Run set', keys=(RunsetGroupKey(key='bigfish', value='ppg_procgen'),)): '#2980b9', RunsetGroup(runset_name='Run set', keys=(RunsetGroupKey(key='bigfish', value='ppo_procgen'),)): '#e74c3c'}), H1(text='Heading from Report 2'), P(text='Est quod ducimus ut distinctio corruptiid optio qui cupiditate quibusdam ea corporis modi. Eum architecto vero sed error dignissimosEa repudiandae a recusandae sint ut sint molestiae ea pariatur quae. In pariatur voluptas ad facere neque 33 suscipit et odit nostrum ut internos molestiae est modi enim. Et rerum inventoreAut internos et dolores delectus aut Quis sunt sed nostrum magnam ab dolores dicta.'), PanelGrid(runsets=[Runset(entity='openrlbenchmark', project='cleanrl', name='DQN', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.8', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.88', groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)])], panels=[LinePlot(title='SPS', x='global_step', y=['charts/SPS'], layout=Layout(x=0, y=0, w=8, h=6)), LinePlot(title='Episodic Length', x='global_step', y=['charts/episodic_length'], layout=Layout(x=8, y=0, w=8, h=6)), LinePlot(title='Episodic Return', x='global_step', y=['charts/episodic_return'], layout=Layout(x=16, y=0, w=8, h=6))], active_runset=0, custom_run_colors={RunsetGroup(runset_name='DQN', keys=(RunsetGroupKey(key='dqn_atari', value='exp_name'),)): '#e84118', RunsetGroup(runset_name='SAC-discrete 0.8', keys=(RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#fbc531', RunsetGroup(runset_name='SAC-discrete 0.88', keys=(RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#00a8ff'})], id='Vmlldzo5MTA1NTc5')" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "report3 = wr.Report(\n", " PROJECT,\n", @@ -2796,9 +830,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "pXt2x1L07NDV" - }, + "metadata": {}, "source": [ "## I tried mutating an object in list but it didn't work!\n", "tl;dr: It should always work if you assign a value to the attribute instead of mutating. If you really need to mutate, do it before assignment.\n", @@ -2813,10 +845,8 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": { - "id": "0EbcQqOM7NDV" - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "report = wr.Report(project=PROJECT)" @@ -2824,19 +854,15 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "H0J06T757NDV" - }, + "metadata": {}, "source": [ "Good: Assign `b`" ] }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "id": "tgMca01g7NDV" - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "b = wr.H1(text=[\"Hello\", \" World!\"])\n", @@ -2847,32 +873,16 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "uDQ8wSn77NDV" - }, + "metadata": {}, "source": [ "Bad: Mutate `b` without reassigning" ] }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "id": "xMX5Xr0x7NDV" - }, - "outputs": [ - { - "ename": "AssertionError", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[18], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m b\u001b[38;5;241m.\u001b[39mtext \u001b[38;5;241m=\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSomething\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m New\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m b\u001b[38;5;241m.\u001b[39mtext \u001b[38;5;241m==\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSomething\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m New\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m report\u001b[38;5;241m.\u001b[39mblocks[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mtext \u001b[38;5;241m==\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHello\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m World!\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# This will error!\u001b[39;00m\n", - "\u001b[0;31mAssertionError\u001b[0m: " - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "b.text = [\"Something\", \" New\"]\n", "assert b.text == [\"Something\", \" New\"]\n", @@ -2883,9 +893,7 @@ }, { "cell_type": "markdown", - "metadata": { - "id": "KUMkP_9t7NDV" - }, + "metadata": {}, "source": [ "Good: Mutate `b` and then reassign it" ] @@ -2893,9 +901,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "id": "Wif3JPMo7NDV" - }, + "metadata": {}, "outputs": [], "source": [ "report.blocks = [b]\n", @@ -2925,8 +931,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.0" + "pygments_lexer": "ipython3" } }, "nbformat": 4,