diff --git a/colabs/intro/Report_API_Quickstart.ipynb b/colabs/intro/Report_API_Quickstart.ipynb index 0a04d846..51faaa81 100644 --- a/colabs/intro/Report_API_Quickstart.ipynb +++ b/colabs/intro/Report_API_Quickstart.ipynb @@ -2786,27 +2786,35 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 29, "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 436 + "height": 1000 }, "id": "E95cCJQK7NDQ", - "outputId": "b05e7fd6-bb52-4e7d-da9d-932ac5a53d7a" + "outputId": "63a57741-a311-46f5-d2f1-3d9174285a41" }, "outputs": [ { - "output_type": "error", - "ename": "ValidationError", - "evalue": "2 validation errors for WeaveBlockSummaryTable\nentity\n Field required [type=missing, input_value=ArgsKwargs((), {'table_name': 'my-table'}), input_type=ArgsKwargs]\n For further information visit https://errors.pydantic.dev/2.8/v/missing\nproject\n Field required [type=missing, input_value=ArgsKwargs((), {'table_name': 'my-table'}), input_type=ArgsKwargs]\n For further information visit https://errors.pydantic.dev/2.8/v/missing", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 87\u001b[0m \u001b[0mchart_fields\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'x'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'val_loss'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'y'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'val_acc'\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 88\u001b[0m ),\n\u001b[0;32m---> 89\u001b[0;31m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mWeaveBlockSummaryTable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtable_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"my-table\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 90\u001b[0m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mWeaveBlockArtifact\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0martifact\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'model-1'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtab\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'lineage'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 91\u001b[0m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mWeaveBlockArtifactVersionedFile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0martifact\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'model-1'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mversion\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'v0'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"dataframe.table.json\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_dataclasses.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(__dataclass_self__, *args, **kwargs)\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[0m__tracebackhide__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m__dataclass_self__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 141\u001b[0;31m \u001b[0ms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__pydantic_validator__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalidate_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mArgsKwargs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself_instance\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 142\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__qualname__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34mf'{cls.__qualname__}.__init__'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValidationError\u001b[0m: 2 validation errors for WeaveBlockSummaryTable\nentity\n Field required [type=missing, input_value=ArgsKwargs((), {'table_name': 'my-table'}), input_type=ArgsKwargs]\n For further information visit https://errors.pydantic.dev/2.8/v/missing\nproject\n Field required [type=missing, input_value=ArgsKwargs((), {'table_name': 'my-table'}), input_type=ArgsKwargs]\n For further information visit https://errors.pydantic.dev/2.8/v/missing" + "output_type": "stream", + "name": "stderr", + "text": [ + "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/sephmard/report-api-quickstart/reports/W&B-Panel-Gallery--Vmlldzo5MDkxODk1\n" ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Report(project='report-api-quickstart', entity='sephmard', 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='Vmlldzo5MDkxODk1')" + ], + "text/html": [ + "" + ] + }, + "metadata": {}, + "execution_count": 29 } ], "source": [ @@ -2840,14 +2848,14 @@ " title_y=\"Validation Accuracy\",\n", " ignore_outliers=True,\n", " groupby='encoder',\n", - " groupby_aggfunc=\"mean\", # Use string directly\n", - " groupby_rangefunc=\"minmax\", # Use string directly\n", + " groupby_aggfunc=\"mean\",\n", + " groupby_rangefunc=\"minmax\",\n", " smoothing_factor=0.5,\n", - " smoothing_type=\"gaussian\", # Use string directly\n", + " smoothing_type=\"gaussian\",\n", " smoothing_show_original=True,\n", " max_runs_to_show=10,\n", - " font_size=\"large\", # Use string directly\n", - " legend_position=\"west\", # Use string directly\n", + " font_size=\"large\",\n", + " legend_position=\"west\",\n", " ),\n", " wr.ScatterPlot(\n", " title=\"Validation Accuracy vs. Validation Loss\",\n", @@ -2858,7 +2866,7 @@ " running_ymin=True,\n", " running_ymean=True,\n", " running_ymax=True,\n", - " font_size=\"small\", # Use string directly\n", + " font_size=\"small\",\n", " regression=True,\n", " ),\n", " wr.BarPlot(\n", @@ -2868,20 +2876,20 @@ " range_x=(0, 0.11),\n", " title_x=\"Validation Loss\",\n", " groupby='encoder',\n", - " groupby_aggfunc=\"median\", # Use string directly\n", - " groupby_rangefunc=\"stddev\", # Use string directly\n", + " groupby_aggfunc=\"median\",\n", + " groupby_rangefunc=\"stddev\",\n", " max_runs_to_show=20,\n", " max_bars_to_show=3,\n", - " font_size=\"auto\", # Use string directly\n", + " font_size=\"auto\",\n", " ),\n", " wr.ScalarChart(\n", " title=\"Maximum Number of Steps\",\n", " metric=\"Step\",\n", - " groupby_aggfunc=\"max\", # Use string directly\n", - " groupby_rangefunc=\"stderr\", # Use string directly\n", - " font_size=\"large\", # Use string directly\n", + " groupby_aggfunc=\"max\",\n", + " groupby_rangefunc=\"stderr\",\n", + " font_size=\"large\",\n", " ),\n", - " wr.CodeComparer(diff=\"split\"), # Corrected\n", + " wr.CodeComparer(diff=\"split\"),\n", " wr.ParallelCoordinatesPlot(\n", " columns=[\n", " wr.ParallelCoordinatesPlotColumn(\"Step\"),\n", @@ -2898,11 +2906,27 @@ " chart_name='wandb/scatter/v0',\n", " chart_fields={'x': 'val_loss', 'y': 'val_acc'}\n", " ),\n", - " wr.WeaveBlockSummaryTable(table_name=\"my-table\"),\n", - " wr.WeaveBlockArtifact(artifact='model-1', tab='lineage'),\n", - " wr.WeaveBlockArtifactVersionedFile(artifact='model-1', version='v0', file=\"dataframe.table.json\"),\n", " ],\n", " ),\n", + " # Add WeaveBlock types directly to the blocks list\n", + " wr.WeaveBlockSummaryTable(\n", + " entity=\"your_entity\", # Replace with your actual entity\n", + " project=\"your_project\", # Replace with your actual project\n", + " table_name=\"my-table\"\n", + " ),\n", + " wr.WeaveBlockArtifact(\n", + " entity=\"your_entity\", # Replace with your actual entity\n", + " project=\"your_project\", # Replace with your actual project\n", + " artifact='model-1',\n", + " tab='lineage'\n", + " ),\n", + " wr.WeaveBlockArtifactVersionedFile(\n", + " entity=\"your_entity\", # Replace with your actual entity\n", + " project=\"your_project\", # Replace with your actual project\n", + " artifact='model-1',\n", + " version='v0',\n", + " file=\"dataframe.table.json\"\n", + " ),\n", " ]\n", ")\n", "report.save()\n" @@ -2920,79 +2944,139 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 32, "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 384 + "height": 1000 }, "id": "ueOH3zoS7NDR", - "outputId": "770c2bc0-5e18-407a-c862-ce40e1558c95" + "outputId": "4c92765c-c2d4-47e3-b2c4-ff82e5cd6634" }, "outputs": [ { - "output_type": "error", - "ename": "ValidationError", - "evalue": "1 validation error for MediaBrowser\nmedia_keys\n Input should be a valid list [type=list_type, input_value='videos', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/list_type", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 9\u001b[0m panels=[\n\u001b[1;32m 10\u001b[0m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLinePlot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'global_step'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'charts/episodic_return'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msmoothing_factor\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.85\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroupby_aggfunc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'mean'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroupby_rangefunc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'minmax'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlayout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'x'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'y'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'w'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'h'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m8\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMediaBrowser\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmedia_keys\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"videos\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnum_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlayout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'w'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'h'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m8\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m ],\n\u001b[1;32m 13\u001b[0m runsets=[\n", - "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_dataclasses.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(__dataclass_self__, *args, **kwargs)\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[0m__tracebackhide__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m__dataclass_self__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 141\u001b[0;31m \u001b[0ms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__pydantic_validator__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalidate_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mArgsKwargs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself_instance\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 142\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__qualname__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34mf'{cls.__qualname__}.__init__'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValidationError\u001b[0m: 1 validation error for MediaBrowser\nmedia_keys\n Input should be a valid list [type=list_type, input_value='videos', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/list_type" + "output_type": "stream", + "name": "stderr", + "text": [ + "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/sephmard/report-api-quickstart/reports/Report-1--Vmlldzo5MDkxOTM4\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/sephmard/report-api-quickstart/reports/Report-2--Vmlldzo5MDkxOTQw\n" ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Report(project='report-api-quickstart', entity='sephmard', 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', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'dqn_atari'\", groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.8', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.8\", groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.88', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 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='Vmlldzo5MDkxOTQw')" + ], + "text/html": [ + "" + ] + }, + "metadata": {}, + "execution_count": 32 } ], "source": [ + "import wandb_workspaces.reports.v2 as wr\n", + "\n", "report1 = wr.Report(\n", - " PROJECT,\n", + " project=PROJECT,\n", " title='Report 1',\n", " description=\"Great content coming from Report 1\",\n", " blocks=[\n", - " wr.H1('Heading from Report 1'),\n", - " wr.P('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.'),\n", + " wr.H1(text='Heading from Report 1'),\n", + " wr.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.'),\n", " wr.PanelGrid(\n", " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return'], smoothing_factor=0.85, groupby_aggfunc='mean', groupby_rangefunc='minmax', layout={'x': 0, 'y': 0, 'w': 12, 'h': 8}),\n", - " wr.MediaBrowser(media_keys=\"videos\", num_columns=4, layout={'w': 12, 'h': 8}),\n", + " wr.LinePlot(\n", + " title=\"Episodic Return\",\n", + " x='global_step',\n", + " y=['charts/episodic_return'],\n", + " smoothing_factor=0.85,\n", + " groupby_aggfunc='mean',\n", + " groupby_rangefunc='minmax',\n", + " layout=wr.Layout(x=0, y=0, w=12, h=8)\n", + " ),\n", + " wr.MediaBrowser(\n", + " media_keys=[\"videos\"],\n", + " num_columns=4,\n", + " layout=wr.Layout(w=12, h=8)\n", + " ),\n", " ],\n", " runsets=[\n", - " wr.Runset(entity='openrlbenchmark', project='cleanrl', query='bigfish', groupby=['env_id', 'exp_name'])\n", + " wr.Runset(\n", + " entity='openrlbenchmark',\n", + " project='cleanrl',\n", + " query='bigfish',\n", + " groupby=['env_id', 'exp_name']\n", + " )\n", " ],\n", " custom_run_colors={\n", - " ('Run set', 'bigfish', 'ppg_procgen'): \"#2980b9\",\n", - " ('Run set', 'bigfish', 'ppo_procgen'): \"#e74c3c\",\n", + " wr.RunsetGroup(runset_name='Run set', keys=(wr.RunsetGroupKey(key='bigfish', value='ppg_procgen'),)): \"#2980b9\",\n", + " wr.RunsetGroup(runset_name='Run set', keys=(wr.RunsetGroupKey(key='bigfish', value='ppo_procgen'),)): \"#e74c3c\",\n", " }\n", " ),\n", " ]\n", - ").save()\n", + ")\n", + "report1.save()\n", "\n", "report2 = wr.Report(\n", - " PROJECT,\n", + " project=PROJECT,\n", " title='Report 2',\n", " description=\"Great content coming from Report 2\",\n", " blocks=[\n", - " wr.H1('Heading from Report 2'),\n", - " wr.P('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.'),\n", + " wr.H1(text='Heading from Report 2'),\n", + " wr.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.'),\n", " wr.PanelGrid(\n", " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/SPS']),\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_length']),\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return']),\n", + " wr.LinePlot(\n", + " title=\"SPS\",\n", + " x='global_step',\n", + " y=['charts/SPS']\n", + " ),\n", + " wr.LinePlot(\n", + " title=\"Episodic Length\",\n", + " x='global_step',\n", + " y=['charts/episodic_length']\n", + " ),\n", + " wr.LinePlot(\n", + " title=\"Episodic Return\",\n", + " x='global_step',\n", + " y=['charts/episodic_return']\n", + " ),\n", " ],\n", " runsets=[\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"DQN\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'dqn_atari'\"),\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"SAC-discrete 0.8\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.8\"),\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"SAC-discrete 0.88\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.88\"),\n", + " wr.Runset(\n", + " entity=\"openrlbenchmark\",\n", + " project=\"cleanrl\",\n", + " name=\"DQN\",\n", + " groupby=[\"exp_name\"],\n", + " filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'dqn_atari'\"\n", + " ),\n", + " wr.Runset(\n", + " entity=\"openrlbenchmark\",\n", + " project=\"cleanrl\",\n", + " name=\"SAC-discrete 0.8\",\n", + " groupby=[\"exp_name\"],\n", + " filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.8\"\n", + " ),\n", + " wr.Runset(\n", + " entity=\"openrlbenchmark\",\n", + " project=\"cleanrl\",\n", + " name=\"SAC-discrete 0.88\",\n", + " groupby=[\"exp_name\"],\n", + " filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.88\"\n", + " ),\n", " ],\n", " custom_run_colors={\n", - " ('DQN', 'dqn_atari'): '#e84118',\n", - " ('SAC-discrete 0.8', 'sac_atari'): '#fbc531',\n", - " ('SAC-discrete 0.88', 'sac_atari'): '#00a8ff',\n", + " wr.RunsetGroup(runset_name='DQN', keys=(wr.RunsetGroupKey(key='dqn_atari', value='exp_name'),)): '#e84118',\n", + " wr.RunsetGroup(runset_name='SAC-discrete 0.8', keys=(wr.RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#fbc531',\n", + " wr.RunsetGroup(runset_name='SAC-discrete 0.88', keys=(wr.RunsetGroupKey(key='sac_atari', value='exp_name'),)): '#00a8ff',\n", " }\n", " ),\n", " ]\n", - ").save()" + ")\n", + "report2.save()\n" ] }, { @@ -3006,11 +3090,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 33, "metadata": { - "id": "vfRryyUM7NDR" + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "vfRryyUM7NDR", + "outputId": "6015ddba-80c3-4506-f952-587e2163ec76" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/sephmard/report-api-quickstart/reports/Report-with-links--Vmlldzo5MDkxOTQ0\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Report(project='report-api-quickstart', entity='sephmard', 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='Vmlldzo5MDkxOTQ0')" + ], + "text/html": [ + "" + ] + }, + "metadata": {}, + "execution_count": 33 + } + ], "source": [ "report = wr.Report(PROJECT,\n", " title=\"Report with links\",\n", @@ -3030,11 +3140,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 35, "metadata": { - "id": "9GWSIsVp7NDU" + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "9GWSIsVp7NDU", + "outputId": "8b4961d1-9a5e-4c81-ffe7-f27a35874077" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "\u001b[34m\u001b[1mwandb\u001b[0m: Saved report to: https://wandb.ai/sephmard/report-api-quickstart/reports/Combined-blocks-report--Vmlldzo5MDkxOTUx\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Report(project='report-api-quickstart', entity='sephmard', 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', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'dqn_atari'\", groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.8', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.8\", groupby=['exp_name'], order=[OrderBy(name='CreatedTimestamp', ascending=False)]), Runset(entity='openrlbenchmark', project='cleanrl', name='SAC-discrete 0.88', filters=\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 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='Vmlldzo5MDkxOTUx')" + ], + "text/html": [ + "" + ] + }, + "metadata": {}, + "execution_count": 35 + } + ], "source": [ "report3 = wr.Report(\n", " PROJECT,\n", @@ -3045,220 +3181,6 @@ "report3.save()" ] }, - { - "cell_type": "markdown", - "metadata": { - "id": "idHLd-1h7NDU" - }, - "source": [ - "### Reference the two reports in a gallery block" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "ghXboOfw7NDU" - }, - "outputs": [], - "source": [ - "report4 = wr.Report(\n", - " PROJECT,\n", - " title=\"Referenced reports via Gallery\",\n", - " description=\"This report has gallery links to Report1 and Report 2\",\n", - " blocks=[wr.Gallery(ids=[report1.id, report2.id])]\n", - ")\n", - "report4.save()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "vR2sWXD67NDU" - }, - "source": [ - "## Can I build the report up from smaller pieces / all at once?\n", - "Yep. We'll demonstrate by putting together a report with a parallel coordinates plot.\n", - "\n", - "NOTE: this section assumes you have run the [sweeps notebook](https://colab.research.google.com/github/wandb/examples/blob/master/colabs/pytorch/Organizing_Hyperparameter_Sweeps_in_PyTorch_with_W%26B.ipynb) already." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "CAxho1Cm7NDU" - }, - "source": [ - "### Build it up incrementally\n", - "As you might do if you were creating a report in the UI" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "1EFobQP87NDU" - }, - "source": [ - "1. Create a report" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "EVKJ8QND7NDU" - }, - "outputs": [], - "source": [ - "report = wr.Report(project=PROJECT, title='Parallel Coordinates Example', description=\"Using the pytorch sweeps demo\")" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "ehmADFWm7NDU" - }, - "source": [ - "2. Add a panel grid" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "qKdW4a_-7NDV" - }, - "outputs": [], - "source": [ - "pg = wr.PanelGrid()\n", - "report.blocks = [pg]" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "GTC2n_fZ7NDV" - }, - "source": [ - "3. Specify your runsets" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "UV4xQDru7NDV" - }, - "outputs": [], - "source": [ - "pg.runsets = [wr.Runset(project='pytorch-sweeps-demo')]" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "a2vjUG8n7NDV" - }, - "source": [ - "4. Specify your panels" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "kLgQrDNp7NDV" - }, - "outputs": [], - "source": [ - "pg.panels = [\n", - " wr.ParallelCoordinatesPlot(\n", - " columns=[\n", - " wr.PCColumn(metric=\"c::batch_size\"),\n", - " wr.PCColumn(metric=\"c::dropout\"),\n", - " wr.PCColumn(metric=\"c::epochs\"),\n", - " wr.PCColumn(metric=\"c::fc_layer_size\"),\n", - " wr.PCColumn(metric=\"c::learning_rate\"),\n", - " wr.PCColumn(metric=\"c::optimizer\"),\n", - " wr.PCColumn(metric=\"loss\"),\n", - " ]\n", - " )\n", - "]\n" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "5QcXrwKp7NDV" - }, - "source": [ - "5. Save the report" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "2rfXotd97NDV" - }, - "outputs": [], - "source": [ - "report.save()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "bbt1ZEAG7NDV" - }, - "source": [ - "### The same thing all-in-one" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "wpMLhshr7NDV" - }, - "outputs": [], - "source": [ - "report = wr.Report(\n", - " project=PROJECT,\n", - " title=\"Parallel Coordinates Example (all-in-one)\",\n", - " description=\"Using the pytorch sweeps demo (same as the other one but written in one expression)\",\n", - " blocks=[\n", - " wr.PanelGrid(\n", - " runsets=[wr.Runset(project=\"pytorch-sweeps-demo\")],\n", - " panels=[\n", - " wr.ParallelCoordinatesPlot(\n", - " columns=[\n", - " wr.PCColumn(metric='c::batch_size'),\n", - " wr.PCColumn(metric='c::dropout'),\n", - " wr.PCColumn(metric='c::epochs'),\n", - " wr.PCColumn(metric='c::fc_layer_size'),\n", - " wr.PCColumn(metric='c::learning_rate'),\n", - " wr.PCColumn(metric='c::optimizer'),\n", - " wr.PCColumn(metric='loss'),\n", - " ]\n", - " )\n", - " ],\n", - " )\n", - " ],\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "qy-M-uzd7NDV" - }, - "outputs": [], - "source": [ - "report.save()" - ] - }, { "cell_type": "markdown", "metadata": { @@ -3365,7 +3287,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 54, "metadata": { "id": "2MhP1QHj7NDV" }, @@ -3626,143 +3548,6 @@ "# 📌 Complete Examples " ] }, - { - "cell_type": "markdown", - "metadata": { - "id": "S9xQQ2hf7NDW" - }, - "source": [ - "## Reinforcement Learning (RL)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 384 - }, - "id": "wzQoQlvs7NDW", - "outputId": "84c8cff3-c91b-455f-9d1e-11bf8590361f" - }, - "outputs": [ - { - "output_type": "error", - "ename": "ValidationError", - "evalue": "1 validation error for MediaBrowser\nmedia_keys\n Input should be a valid list [type=list_type, input_value='videos', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/list_type", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 11\u001b[0m panels=[\n\u001b[1;32m 12\u001b[0m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLinePlot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'global_step'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'charts/episodic_return'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msmoothing_factor\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.85\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroupby_aggfunc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'mean'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgroupby_rangefunc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'minmax'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlayout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'x'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'y'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'w'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'h'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m8\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mwr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMediaBrowser\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmedia_keys\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"videos\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnum_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlayout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'w'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'h'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m8\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m ],\n\u001b[1;32m 15\u001b[0m runsets=[\n", - "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_dataclasses.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(__dataclass_self__, *args, **kwargs)\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[0m__tracebackhide__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m__dataclass_self__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 141\u001b[0;31m \u001b[0ms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__pydantic_validator__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalidate_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mArgsKwargs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself_instance\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 142\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__qualname__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34mf'{cls.__qualname__}.__init__'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValidationError\u001b[0m: 1 validation error for MediaBrowser\nmedia_keys\n Input should be a valid list [type=list_type, input_value='videos', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/list_type" - ] - } - ], - "source": [ - "wr.Report(\n", - " project=PROJECT,\n", - " title='Reinforcement Learning Report',\n", - " description='Aut totam dolores aut galisum atque aut placeat quia. Vel quisquam omnis ut quibusdam doloremque a delectus quia in omnis deserunt. Quo ipsum beatae aut veniam earum non ipsa reiciendis et fugiat asperiores est veritatis magni et corrupti internos. Ut quis libero ut alias reiciendis et animi delectus.',\n", - " blocks=[\n", - " wr.TableOfContents(),\n", - " wr.H1(\"Ea quidem illo est dolorem illo.\"),\n", - " wr.P(\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac eros ut nunc venenatis tincidunt vel ut dolor. Sed sed felis dictum, congue risus vel, aliquet dolor. Donec ut risus vel leo dictum tristique. Nunc sed urna mi. Morbi nulla turpis, vehicula eu maximus ut, gravida id libero. Duis porta risus leo, quis lobortis enim ultrices a. Donec quam augue, vestibulum vitae mollis at, tincidunt non orci. Morbi faucibus dignissim tempor. Vestibulum ornare augue a orci tincidunt porta. Pellentesque et ante et purus gravida euismod. Maecenas sit amet sollicitudin felis, sed egestas nunc.\"),\n", - " wr.H2('Et sunt sunt eum asperiores ratione.'),\n", - " wr.PanelGrid(\n", - " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return'], smoothing_factor=0.85, groupby_aggfunc='mean', groupby_rangefunc='minmax', layout={'x': 0, 'y': 0, 'w': 12, 'h': 8}),\n", - " wr.MediaBrowser(media_keys=\"videos\", num_columns=4, layout={'w': 12, 'h': 8}),\n", - " ],\n", - " runsets=[\n", - " wr.Runset(entity='openrlbenchmark', project='cleanrl', query='bigfish', groupby=['env_id', 'exp_name'])\n", - " ],\n", - " custom_run_colors={\n", - " ('Run set', 'bigfish', 'ppg_procgen'): \"#2980b9\",\n", - " ('Run set', 'bigfish', 'ppo_procgen'): \"#e74c3c\",\n", - " }\n", - " ),\n", - " wr.H2('Sit officia inventore non omnis deleniti.'),\n", - " wr.PanelGrid(\n", - " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return'], smoothing_factor=0.85, groupby_aggfunc='mean', groupby_rangefunc='minmax', layout={'x': 0, 'y': 0, 'w': 12, 'h': 8}),\n", - " wr.MediaBrowser(media_keys=\"videos\", num_columns=4, layout={'w': 12, 'h': 8}),\n", - " ],\n", - " runsets=[\n", - " wr.Runset(entity='openrlbenchmark', project='cleanrl', query='starpilot', groupby=['env_id', 'exp_name'])\n", - " ],\n", - " custom_run_colors={\n", - " ('Run set', 'starpilot', 'ppg_procgen'): \"#2980b9\",\n", - " ('Run set', 'starpilot', 'ppo_procgen'): \"#e74c3c\",\n", - " }\n", - " ),\n", - " wr.H2('Aut amet nesciunt vel quisquam repellendus sed labore voluptas.'),\n", - " wr.PanelGrid(\n", - " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return'], smoothing_factor=0.85, groupby_aggfunc='mean', groupby_rangefunc='minmax', layout={'x': 0, 'y': 0, 'w': 12, 'h': 8}),\n", - " wr.MediaBrowser(media_keys=\"videos\", num_columns=4, layout={'x': 0, 'y': 0, 'w': 12, 'h': 8}),\n", - " ],\n", - " runsets=[\n", - " wr.Runset(entity='openrlbenchmark', project='cleanrl', query='bossfight', groupby=['env_id', 'exp_name'])\n", - " ],\n", - " custom_run_colors={\n", - " ('Run set', 'bossfight', 'ppg_procgen'): \"#2980b9\",\n", - " ('Run set', 'bossfight', 'ppo_procgen'): \"#e74c3c\",\n", - " }\n", - " ),\n", - " wr.HorizontalRule(),\n", - " wr.H1(\"Sed consectetur vero et voluptas voluptatem et adipisci blanditiis.\"),\n", - " wr.P(\"Sit aliquid repellendus et numquam provident quo quaerat earum 33 sunt illo et quos voluptate est officia deleniti. Vel architecto nulla ex nulla voluptatibus qui saepe officiis quo illo excepturi ea dolorum reprehenderit.\"),\n", - " wr.H2(\"Qui debitis iure 33 voluptatum eligendi.\"),\n", - " wr.P(\"Non veniam laudantium et fugit distinctio qui aliquid eius sed laudantium consequatur et quia perspiciatis. Et odio inventore est voluptas fugiat id perspiciatis dolorum et perferendis recusandae vel Quis odio 33 beatae veritatis. Ex sunt accusamus aut soluta eligendi sed perspiciatis maxime 33 dolorem dolorum est aperiam minima. Et earum rerum eos illo sint eos temporibus similique ea fuga iste sed quia soluta sit doloribus corporis sed tenetur excepturi?\"),\n", - " wr.PanelGrid(\n", - " panels=[\n", - " wr.LinePlot(x='global_step', y=['charts/SPS']),\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_length']),\n", - " wr.LinePlot(x='global_step', y=['charts/episodic_return']),\n", - " ],\n", - " runsets=[\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"DQN\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'dqn_atari'\"),\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"SAC-discrete 0.8\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.8\"),\n", - " wr.Runset(\"openrlbenchmark\", \"cleanrl\", \"SAC-discrete 0.88\", groupby=[\"exp_name\"]).set_filters_with_python_expr(\"env_id == 'BreakoutNoFrameskip-v4' and exp_name == 'sac_atari' and target_entropy_scale == 0.88\"),\n", - " ],\n", - " custom_run_colors={\n", - " ('DQN', 'dqn_atari'): '#e84118',\n", - " ('SAC-discrete 0.8', 'sac_atari'): '#fbc531',\n", - " ('SAC-discrete 0.88', 'sac_atari'): '#00a8ff',\n", - " }\n", - " ),\n", - " ]\n", - ").save()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "lKzeGFRg7NDW" - }, - "source": [ - "## Customer Landing Page" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "LyayakfB7NDW" - }, - "outputs": [], - "source": [ - "report = wr.templates.create_customer_landing_page(\n", - " project=PROJECT,\n", - " company_name='Company',\n", - " main_contact='Contact McContact (email@company.com)',\n", - " slack_link='https://company.slack.com/blah',\n", - ")\n", - "report.save()" - ] - }, { "cell_type": "markdown", "metadata": {