From 0e59a0818d9537f7eacc1373bfa4a0146922379e Mon Sep 17 00:00:00 2001 From: Siddhant Sadangi Date: Tue, 27 Feb 2024 14:15:48 +0100 Subject: [PATCH] Removed separate plotting examples (#297) --- .github/workflows/pull-request.yml | 1 + .github/workflows/test-notebooks.yml | 4 - .github/workflows/test-scripts.yml | 4 - .../notebooks/Neptune_Altair_Support.ipynb | 338 ------------------ .../altair/scripts/Neptune_Altair_Support.py | 37 -- .../altair/scripts/requirements.txt | 3 - .../altair/scripts/run_examples.sh | 7 - .../notebooks/Neptune_Bokeh_Support.ipynb | 318 ---------------- .../bokeh/scripts/Neptune_Bokeh_Support.py | 25 -- .../bokeh/scripts/requirements.txt | 2 - .../bokeh/scripts/run_examples.sh | 7 - .../Neptune_Matplotlib_Support.ipynb | 328 ----------------- .../scripts/Neptune_Matplotlib_Support.py | 24 -- .../matplotlib/scripts/requirements.txt | 3 - .../matplotlib/scripts/run_examples.sh | 7 - .../notebooks/Neptune_Plotly_Support.ipynb | 292 --------------- .../plotly/scripts/Neptune_Plotly_Support.py | 15 - .../plotly/scripts/requirements.txt | 2 - .../plotly/scripts/run_examples.sh | 7 - 19 files changed, 1 insertion(+), 1423 deletions(-) delete mode 100644 integrations-and-supported-tools/altair/notebooks/Neptune_Altair_Support.ipynb delete mode 100644 integrations-and-supported-tools/altair/scripts/Neptune_Altair_Support.py delete mode 100644 integrations-and-supported-tools/altair/scripts/requirements.txt delete mode 100644 integrations-and-supported-tools/altair/scripts/run_examples.sh delete mode 100644 integrations-and-supported-tools/bokeh/notebooks/Neptune_Bokeh_Support.ipynb delete mode 100644 integrations-and-supported-tools/bokeh/scripts/Neptune_Bokeh_Support.py delete mode 100644 integrations-and-supported-tools/bokeh/scripts/requirements.txt delete mode 100644 integrations-and-supported-tools/bokeh/scripts/run_examples.sh delete mode 100644 integrations-and-supported-tools/matplotlib/notebooks/Neptune_Matplotlib_Support.ipynb delete mode 100644 integrations-and-supported-tools/matplotlib/scripts/Neptune_Matplotlib_Support.py delete mode 100644 integrations-and-supported-tools/matplotlib/scripts/requirements.txt delete mode 100644 integrations-and-supported-tools/matplotlib/scripts/run_examples.sh delete mode 100644 integrations-and-supported-tools/plotly/notebooks/Neptune_Plotly_Support.ipynb delete mode 100644 integrations-and-supported-tools/plotly/scripts/Neptune_Plotly_Support.py delete mode 100644 integrations-and-supported-tools/plotly/scripts/requirements.txt delete mode 100644 integrations-and-supported-tools/plotly/scripts/run_examples.sh diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6a4df9cce..d8ae542d4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -41,6 +41,7 @@ jobs: exclude: - notebooks: - integrations-and-supported-tools/detectron2/notebooks/Neptune_Detectron2.ipynb + - integrations-and-supported-tools/mosaicml-composer/notebooks/Neptune_MosaicML_Composer.ipynb os: windows-latest - notebooks: - integrations-and-supported-tools/mosaicml-composer/notebooks/Neptune_MosaicML_Composer.ipynb diff --git a/.github/workflows/test-notebooks.yml b/.github/workflows/test-notebooks.yml index 32cc358d6..36e41a617 100644 --- a/.github/workflows/test-notebooks.yml +++ b/.github/workflows/test-notebooks.yml @@ -31,8 +31,6 @@ jobs: - how-to-guides/re-run-failed-training/notebooks/re_run_failed_training.ipynb - how-to-guides/reproduce-run/notebooks/reproduce_run.ipynb - how-to-guides/restart-run-from-checkpoint/notebooks/neptune_save_restart_run_from_checkpoint.ipynb - - integrations-and-supported-tools/altair/notebooks/Neptune_Altair_Support.ipynb - - integrations-and-supported-tools/bokeh/notebooks/Neptune_Bokeh_Support.ipynb - integrations-and-supported-tools/catalyst/notebooks/Neptune_Catalyst.ipynb - integrations-and-supported-tools/catboost/notebooks/Neptune_CatBoost.ipynb - integrations-and-supported-tools/dalex/notebooks/Neptune_Dalex.ipynb @@ -42,12 +40,10 @@ jobs: - integrations-and-supported-tools/html/notebooks/Neptune_HTML_Support.ipynb - integrations-and-supported-tools/keras/notebooks/Neptune_Keras.ipynb - integrations-and-supported-tools/lightgbm/notebooks/Neptune_LightGBM.ipynb - - integrations-and-supported-tools/matplotlib/notebooks/Neptune_Matplotlib_Support.ipynb - integrations-and-supported-tools/mlflow/notebooks/Neptune_MLflow.ipynb - integrations-and-supported-tools/mosaicml-composer/notebooks/Neptune_MosaicML_Composer.ipynb - integrations-and-supported-tools/optuna/notebooks/Neptune_Optuna_integration.ipynb - integrations-and-supported-tools/pandas/notebooks/Neptune_Pandas.ipynb - - integrations-and-supported-tools/plotly/notebooks/Neptune_Plotly_Support.ipynb - integrations-and-supported-tools/plotting-libraries/notebooks/Neptune_Plotting_Support.ipynb - integrations-and-supported-tools/prophet/notebooks/Neptune_prophet.ipynb - integrations-and-supported-tools/pytorch/notebooks/Neptune_PyTorch.ipynb diff --git a/.github/workflows/test-scripts.yml b/.github/workflows/test-scripts.yml index 1427e3c2f..0f9d7d1ec 100644 --- a/.github/workflows/test-scripts.yml +++ b/.github/workflows/test-scripts.yml @@ -32,8 +32,6 @@ jobs: - how-to-guides/reproduce-run/scripts - how-to-guides/restart-run-from-checkpoint/scripts - integrations-and-supported-tools/airflow/scripts - - integrations-and-supported-tools/altair/scripts - - integrations-and-supported-tools/bokeh/scripts - integrations-and-supported-tools/catalyst/scripts - integrations-and-supported-tools/catboost/scripts - integrations-and-supported-tools/dalex/scripts @@ -44,12 +42,10 @@ jobs: - integrations-and-supported-tools/kedro/scripts - integrations-and-supported-tools/keras/scripts - integrations-and-supported-tools/lightgbm/scripts - - integrations-and-supported-tools/matplotlib/scripts - integrations-and-supported-tools/mlflow/scripts - integrations-and-supported-tools/mosaicml-composer/scripts - integrations-and-supported-tools/optuna/scripts - integrations-and-supported-tools/pandas/scripts - - integrations-and-supported-tools/plotly/scripts - integrations-and-supported-tools/plotting-libraries/scripts - integrations-and-supported-tools/prophet/scripts - integrations-and-supported-tools/pytorch/scripts diff --git a/integrations-and-supported-tools/altair/notebooks/Neptune_Altair_Support.ipynb b/integrations-and-supported-tools/altair/notebooks/Neptune_Altair_Support.ipynb deleted file mode 100644 index cd9b54db2..000000000 --- a/integrations-and-supported-tools/altair/notebooks/Neptune_Altair_Support.ipynb +++ /dev/null @@ -1,338 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "![Neptune + Altair](https://neptune.ai/wp-content/uploads/2023/09/altair.svg)\n", - "\n", - "# Neptune + Altair\n", - "\n", - "\n", - " \"Open\n", - "\n", - " \"Open\n", - " \n", - " \"Explore\n", - "\n", - " \"View\n", - "" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "comment" - ] - }, - "source": [ - "## Introduction\n", - "\n", - "This guide will show you how to:\n", - "\n", - "* Initialize Neptune and create a `run`,\n", - "* Log `altair` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Before you start\n", - "\n", - "This notebook example lets you try out Neptune as an anonymous user, with zero setup.\n", - "\n", - "If you want to see the example logged to your own workspace instead:\n", - "\n", - " 1. Create a Neptune account. [Register →](https://neptune.ai/register)\n", - " 1. Create a Neptune project that you will use for tracking metadata. For instructions, see [Creating a project](https://docs.neptune.ai/setup/creating_project) in the Neptune docs." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Neptune and dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -U -q altair neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "installation" - ] - }, - "source": [ - "## Import and initialize `neptune`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To create a new run for tracking the metadata, you tell Neptune who you are (`api_token`) and where to send the data (`project`).\n", - "\n", - "You can use the default code cell below to create an anonymous run in a public project. **Note**: Public projects are cleaned regularly, so anonymous runs are only stored temporarily.\n", - "\n", - "### Log to your own project instead\n", - "\n", - "Replace the code below with the following:\n", - "\n", - "```python\n", - "from getpass import getpass\n", - "\n", - "run = neptune.init_run(\n", - " project=\"workspace-name/project-name\", # replace with your own (see instructions below)\n", - " api_token=getpass(\"Enter your Neptune API token: \"),\n", - ")\n", - "```\n", - "\n", - "To find your API token and full project name:\n", - "\n", - "1. [Log in to Neptune](https://app.neptune.ai/).\n", - "1. In the bottom-left corner, expand your user menu and select **Get your API token**.\n", - "1. The workspace name is displayed in the top-left corner of the app. \n", - "\n", - " To copy the project path, in the top-right corner, open the settings menu and select **Properties**.\n", - "\n", - "For more help, see [Setting Neptune credentials](https://docs.neptune.ai/setup/setting_credentials) in the Neptune docs." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project=\"common/altair-support\")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment", - "exclude" - ] - }, - "source": [ - "**To open the run in the Neptune web app, click the link that appeared in the cell output.**\n", - "\n", - "We'll use the `run` object we just created to log metadata. You'll see the metadata appear in the app." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header" - ] - }, - "source": [ - "## Log `altair` charts to Neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create a sample chart" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -U -q vega_datasets" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import altair as alt\n", - "from vega_datasets import data\n", - "\n", - "source = data.cars()\n", - "\n", - "brush = alt.selection_interval()\n", - "\n", - "points = (\n", - " alt.Chart(source)\n", - " .mark_point()\n", - " .encode(\n", - " x=\"Horsepower:Q\",\n", - " y=\"Miles_per_Gallon:Q\",\n", - " color=alt.condition(brush, \"Origin:N\", alt.value(\"lightgray\")),\n", - " )\n", - " .add_params(brush)\n", - ")\n", - "\n", - "bars = (\n", - " alt.Chart(source)\n", - " .mark_bar()\n", - " .encode(y=\"Origin:N\", color=\"Origin:N\", x=\"count(Origin):Q\")\n", - " .transform_filter(brush)\n", - ")\n", - "\n", - "chart = points & bars\n", - "\n", - "chart" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Log interactive image" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run[\"interactive_img\"].upload(chart)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Stop logging\n", - "\n", - "**Warning:**
\n", - "Once you are done logging, you should stop tracking the run using the `stop()` method.\n", - "This is needed only while logging from a notebook environment. While logging through a script, Neptune automatically stops tracking once the script has completed execution." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run.stop()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Explore the charts in Neptune\n", - "\n", - "The images can be found in the **All metadata** section." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## Conclusion\n", - "\n", - "You’ve learned how to:\n", - "\n", - "* Initialize Neptune and create a run,\n", - "* Log `altair` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## What's next\n", - "\n", - "Now that you know how to log charts to Neptune, you can learn:\n", - "\n", - "* [How to log other types of metadata to Neptune](https://docs.neptune.ai/logging/what_you_can_log/)\n", - "* [How to download runs data from Neptune](https://docs.neptune.ai/user-guides/logging-and-managing-runs-results/downloading-runs-data)\n", - "* [How to connect Neptune to the ML framework you are using](https://docs.neptune.ai/essentials/integrations)" - ] - } - ], - "metadata": { - "colab": { - "collapsed_sections": [], - "name": "Neptune_Altair_Support.ipynb", - "private_outputs": true, - "provenance": [], - "toc_visible": true - }, - "kernelspec": { - "display_name": "py38", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.11" - }, - "toc-autonumbering": false, - "toc-showcode": false, - "toc-showmarkdowntxt": false, - "toc-showtags": false, - "vscode": { - "interpreter": { - "hash": "a9715cf0b0024f6e1c62cb31a4f1f43970eb41991212681878768b4bfe53050a" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/integrations-and-supported-tools/altair/scripts/Neptune_Altair_Support.py b/integrations-and-supported-tools/altair/scripts/Neptune_Altair_Support.py deleted file mode 100644 index c81b498a6..000000000 --- a/integrations-and-supported-tools/altair/scripts/Neptune_Altair_Support.py +++ /dev/null @@ -1,37 +0,0 @@ -# Import necessary libraries -import altair as alt -import neptune -from vega_datasets import data - -# Initialize Neptune and create a new run -run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project="common/altair-support") - -# Create a sample chart -source = data.cars() - -brush = alt.selection_interval() - -points = ( - alt.Chart(source) - .mark_point() - .encode( - x="Horsepower:Q", - y="Miles_per_Gallon:Q", - color=alt.condition(brush, "Origin:N", alt.value("lightgray")), - ) - .add_params(brush) -) - -bars = ( - alt.Chart(source) - .mark_bar() - .encode(y="Origin:N", color="Origin:N", x="count(Origin):Q") - .transform_filter(brush) -) - -chart = points & bars - -# Log interactive image to Neptune -run["interactive_img"].upload(chart) - -# Tracking will stop automatically once script execution is complete diff --git a/integrations-and-supported-tools/altair/scripts/requirements.txt b/integrations-and-supported-tools/altair/scripts/requirements.txt deleted file mode 100644 index e6811d6f6..000000000 --- a/integrations-and-supported-tools/altair/scripts/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -altair -neptune -vega_datasets diff --git a/integrations-and-supported-tools/altair/scripts/run_examples.sh b/integrations-and-supported-tools/altair/scripts/run_examples.sh deleted file mode 100644 index 0f0f65eb9..000000000 --- a/integrations-and-supported-tools/altair/scripts/run_examples.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -e - -echo "Installing requirements..." -pip install -U -q -r requirements.txt - -echo "Running Neptune_Altair_Support.py..." -python Neptune_Altair_Support.py diff --git a/integrations-and-supported-tools/bokeh/notebooks/Neptune_Bokeh_Support.ipynb b/integrations-and-supported-tools/bokeh/notebooks/Neptune_Bokeh_Support.ipynb deleted file mode 100644 index 439ce3684..000000000 --- a/integrations-and-supported-tools/bokeh/notebooks/Neptune_Bokeh_Support.ipynb +++ /dev/null @@ -1,318 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "![Neptune + Bokeh](https://neptune.ai/wp-content/uploads/2023/09/bokeh.svg)\n", - "\n", - "# Neptune + Bokeh\n", - "\n", - "\n", - " \"Open\n", - "\n", - " \"Open\n", - " \n", - " \"Explore\n", - "\n", - " \"View\n", - "" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "comment" - ] - }, - "source": [ - "## Introduction\n", - "\n", - "This guide will show you how to:\n", - "\n", - "* Initialize Neptune and create a `run`,\n", - "* Log `bokeh` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Before you start\n", - "\n", - "This notebook example lets you try out Neptune as an anonymous user, with zero setup.\n", - "\n", - "If you want to see the example logged to your own workspace instead:\n", - "\n", - " 1. Create a Neptune account. [Register →](https://neptune.ai/register)\n", - " 1. Create a Neptune project that you will use for tracking metadata. For instructions, see [Creating a project](https://docs.neptune.ai/setup/creating_project) in the Neptune docs." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Neptune and dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "! pip install -U bokeh neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "installation" - ] - }, - "source": [ - "## Import and initialize `neptune`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To create a new run for tracking the metadata, you tell Neptune who you are (`api_token`) and where to send the data (`project`).\n", - "\n", - "You can use the default code cell below to create an anonymous run in a public project. **Note**: Public projects are cleaned regularly, so anonymous runs are only stored temporarily.\n", - "\n", - "### Log to your own project instead\n", - "\n", - "Replace the code below with the following:\n", - "\n", - "```python\n", - "from getpass import getpass\n", - "\n", - "run = neptune.init_run(\n", - " project=\"workspace-name/project-name\", # replace with your own (see instructions below)\n", - " api_token=getpass(\"Enter your Neptune API token: \"),\n", - ")\n", - "```\n", - "\n", - "To find your API token and full project name:\n", - "\n", - "1. [Log in to Neptune](https://app.neptune.ai/).\n", - "1. In the bottom-left corner, expand your user menu and select **Get your API token**.\n", - "1. The workspace name is displayed in the top-left corner of the app. \n", - "\n", - " To copy the project path, in the top-right corner, open the settings menu and select **Properties**.\n", - "\n", - "For more help, see [Setting Neptune credentials](https://docs.neptune.ai/setup/setting_credentials) in the Neptune docs." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project=\"common/bokeh-support\")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment", - "exclude" - ] - }, - "source": [ - "**To open the run in the Neptune web app, click the link that appeared in the cell output.**\n", - "\n", - "We'll use the `run` object we just created to log metadata. You'll see the metadata appear in the app." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header" - ] - }, - "source": [ - "## Log `bokeh` charts to Neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create a sample chart" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "from bokeh.plotting import figure\n", - "\n", - "N = 500\n", - "x = np.linspace(0, 10, N)\n", - "y = np.linspace(0, 10, N)\n", - "xx, yy = np.meshgrid(x, y)\n", - "d = np.sin(xx) * np.cos(yy)\n", - "\n", - "p = figure(tooltips=[(\"x\", \"$x\"), (\"y\", \"$y\"), (\"value\", \"@image\")])\n", - "p.x_range.range_padding = p.y_range.range_padding = 0\n", - "\n", - "# must give a vector of image data for image parameter\n", - "p.image(image=[d], x=0, y=0, dw=10, dh=10, palette=\"Spectral11\", level=\"image\")\n", - "p.grid.grid_line_width = 0.5" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Log interactive image" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run[\"interactive_img\"].upload(p)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [] - }, - "source": [ - "## Stop logging\n", - "\n", - "**Warning:**
\n", - "Once you are done logging, you should stop tracking the run using the `stop()` method.\n", - "This is needed only while logging from a notebook environment. While logging through a script, Neptune automatically stops tracking once the script has completed execution." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run.stop()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Explore the charts in Neptune\n", - "\n", - "The images can be found in the **All metadata** section." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## Conclusion\n", - "\n", - "You’ve learned how to:\n", - "\n", - "* Initialize Neptune and create a run,\n", - "* Log `bokeh` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## What's next\n", - "\n", - "Now that you know how to log charts to Neptune, you can learn:\n", - "\n", - "* [How to log other types of metadata to Neptune](https://docs.neptune.ai/logging/what_you_can_log/)\n", - "* [How to download runs data from Neptune](https://docs.neptune.ai/user-guides/logging-and-managing-runs-results/downloading-runs-data)\n", - "* [How to connect Neptune to the ML framework you are using](https://docs.neptune.ai/essentials/integrations)" - ] - } - ], - "metadata": { - "colab": { - "collapsed_sections": [], - "name": "Neptune_Bokeh_Support.ipynb", - "private_outputs": true, - "provenance": [], - "toc_visible": true - }, - "kernelspec": { - "display_name": "py38", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.4" - }, - "toc-autonumbering": false, - "toc-showcode": false, - "toc-showmarkdowntxt": false, - "toc-showtags": false, - "vscode": { - "interpreter": { - "hash": "a9715cf0b0024f6e1c62cb31a4f1f43970eb41991212681878768b4bfe53050a" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/integrations-and-supported-tools/bokeh/scripts/Neptune_Bokeh_Support.py b/integrations-and-supported-tools/bokeh/scripts/Neptune_Bokeh_Support.py deleted file mode 100644 index a8b82d6b3..000000000 --- a/integrations-and-supported-tools/bokeh/scripts/Neptune_Bokeh_Support.py +++ /dev/null @@ -1,25 +0,0 @@ -# Import necessary libraries -import neptune -import numpy as np -from bokeh.plotting import figure - -# Initialize Neptune and create a new run -run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project="common/bokeh-support") - -# Create a sample chart -N = 500 -x = np.linspace(0, 10, N) -y = np.linspace(0, 10, N) -xx, yy = np.meshgrid(x, y) -d = np.sin(xx) * np.cos(yy) - -p = figure(tooltips=[("x", "$x"), ("y", "$y"), ("value", "@image")]) -p.x_range.range_padding = p.y_range.range_padding = 0 - -p.image(image=[d], x=0, y=0, dw=10, dh=10, palette="Spectral11", level="image") -p.grid.grid_line_width = 0.5 - -# Log interactive image to Neptune -run["interactive_img"].upload(p) - -# Tracking will stop automatically once script execution is complete diff --git a/integrations-and-supported-tools/bokeh/scripts/requirements.txt b/integrations-and-supported-tools/bokeh/scripts/requirements.txt deleted file mode 100644 index cc683c0e4..000000000 --- a/integrations-and-supported-tools/bokeh/scripts/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -bokeh -neptune diff --git a/integrations-and-supported-tools/bokeh/scripts/run_examples.sh b/integrations-and-supported-tools/bokeh/scripts/run_examples.sh deleted file mode 100644 index 8ef3fa29a..000000000 --- a/integrations-and-supported-tools/bokeh/scripts/run_examples.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -e - -echo "Installing requirements..." -pip install -U -r requirements.txt - -echo "Running Neptune_Bokeh_Support.py..." -python Neptune_Bokeh_Support.py diff --git a/integrations-and-supported-tools/matplotlib/notebooks/Neptune_Matplotlib_Support.ipynb b/integrations-and-supported-tools/matplotlib/notebooks/Neptune_Matplotlib_Support.ipynb deleted file mode 100644 index 80a34018c..000000000 --- a/integrations-and-supported-tools/matplotlib/notebooks/Neptune_Matplotlib_Support.ipynb +++ /dev/null @@ -1,328 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "![Neptune + Matplotlib](https://neptune.ai/wp-content/uploads/2023/09/matplotlib.svg)\n", - "\n", - "# Neptune + Matplotlib\n", - "\n", - "\n", - " \"Open\n", - "\n", - " \"Open\n", - " \n", - " \"Explore\n", - "\n", - " \"View\n", - "" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "comment" - ] - }, - "source": [ - "## Introduction\n", - "\n", - "This guide will show you how to:\n", - "\n", - "* Install `neptune`,\n", - "* Initialize Neptune and create a `run`,\n", - "* Log `matplotlib` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Before you start\n", - "\n", - "This notebook example lets you try out Neptune as an anonymous user, with zero setup.\n", - "\n", - "If you want to see the example logged to your own workspace instead:\n", - "\n", - " 1. Create a Neptune account. [Register →](https://neptune.ai/register)\n", - " 1. Create a Neptune project that you will use for tracking metadata. For instructions, see [Creating a project](https://docs.neptune.ai/setup/creating_project) in the Neptune docs." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Neptune and dependencies" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Note**: Plotly is not compatible with the latest Matplotlib (3.5.0+) due to the fact that `mpl_to_plotly()` uses deprecated Matplotlib functionalities.\n", - "\n", - "To use Plotly together with Matplotlib, you may need to downgrade your Matplotlib version to `<3.5`. For more information, see [Plotly issue 1568](https://github.com/plotly/plotly.py/issues/1568) and [issue 3624](https://github.com/plotly/plotly.py/issues/3624) on GitHub." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -U -q neptune plotly matplotlib\n", - "%pip install -U -q matplotlib --user" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "installation" - ] - }, - "source": [ - "## Import and initialize `neptune`\n", - "\n", - "To create a new run for tracking the metadata, you tell Neptune who you are (`api_token`) and where to send the data (`project`).\n", - "\n", - "You can use the default code cell below to create an anonymous run in a public project. **Note**: Public projects are cleaned regularly, so anonymous runs are only stored temporarily.\n", - "\n", - "### Log to your own project instead\n", - "\n", - "Replace the code below with the following:\n", - "\n", - "```python\n", - "import neptune\n", - "from getpass import getpass\n", - "\n", - "run = neptune.init_run(\n", - " project=\"workspace-name/project-name\", # replace with your own (see instructions below)\n", - " api_token=getpass(\"Enter your Neptune API token: \"),\n", - ")\n", - "```\n", - "\n", - "To find your API token and full project name:\n", - "\n", - "1. [Log in to Neptune](https://app.neptune.ai/).\n", - "1. In the bottom-left corner, expand your user menu and select **Get your API token**.\n", - "1. The workspace name is displayed in the top-left corner of the app. To copy the project path, in the top-right corner, open the settings menu and select **Properties**.\n", - "\n", - "For more help, see [Setting Neptune credentials](https://docs.neptune.ai/setup/setting_credentials) in the Neptune docs." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import neptune\n", - "\n", - "run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project=\"common/matplotlib-support\")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment", - "exclude" - ] - }, - "source": [ - "**To open the run in the Neptune web app, click the link that appeared in the cell output.**\n", - "\n", - "We'll use the `run` object we just created to log metadata. You'll see the metadata appear in the app." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header" - ] - }, - "source": [ - "## Log `matplotlib` charts to Neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create a sample chart" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "\n", - "np.random.seed(42)\n", - "data = np.random.randn(2, 100)\n", - "\n", - "figure, ax = plt.subplots(2, 2, figsize=(5, 5))\n", - "ax[0, 0].hist(data[0])\n", - "ax[1, 0].scatter(data[0], data[1])\n", - "ax[0, 1].plot(data[0], data[1])" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Log as static image" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run[\"static-img\"].upload(figure)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Log as interactive image" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from neptune.types import File\n", - "\n", - "run[\"interactive-img\"].upload(File.as_html(figure))" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Stop logging\n", - "\n", - "**Warning:**
\n", - "Once you are done logging, you should stop tracking the run using the `stop()` method.\n", - "This is needed only while logging from a notebook environment. While logging through a script, Neptune automatically stops tracking once the script has completed execution." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run.stop()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Explore the charts in Neptune\n", - "\n", - "The images can be found in the **All metadata** section \n", - "![matplotlib-charts](https://neptune.ai/wp-content/uploads/matplotlib-logging.gif)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## Conclusion\n", - "\n", - "You’ve learned how to:\n", - "* Initialize Neptune and create a run,\n", - "* Log `matplotlib` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## What's next\n", - "\n", - "Now that you know how to log charts to Neptune, you can learn:\n", - "\n", - "* [How to log other types of metadata to Neptune](https://docs.neptune.ai/logging/what_you_can_log/)\n", - "* [How to download runs data from Neptune](https://docs.neptune.ai/user-guides/logging-and-managing-runs-results/downloading-runs-data)\n", - "* [How to connect Neptune to the ML framework you are using](https://docs.neptune.ai/essentials/integrations)" - ] - } - ], - "metadata": { - "colab": { - "collapsed_sections": [], - "name": "Neptune_Matplotlib_Support.ipynb", - "private_outputs": true, - "provenance": [], - "toc_visible": true - }, - "kernelspec": { - "display_name": "py38", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.11" - }, - "toc-autonumbering": false, - "toc-showcode": false, - "toc-showmarkdowntxt": false, - "toc-showtags": false, - "vscode": { - "interpreter": { - "hash": "a9715cf0b0024f6e1c62cb31a4f1f43970eb41991212681878768b4bfe53050a" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/integrations-and-supported-tools/matplotlib/scripts/Neptune_Matplotlib_Support.py b/integrations-and-supported-tools/matplotlib/scripts/Neptune_Matplotlib_Support.py deleted file mode 100644 index 81a528f56..000000000 --- a/integrations-and-supported-tools/matplotlib/scripts/Neptune_Matplotlib_Support.py +++ /dev/null @@ -1,24 +0,0 @@ -# Import necessary libraries -import matplotlib.pyplot as plt -import neptune -import numpy as np -from neptune.types import File - -# Initialize Neptune and create a new run -run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project="common/matplotlib-support") - -# Create a sample chart -np.random.seed(42) -data = np.random.randn(2, 100) -figure, ax = plt.subplots(2, 2, figsize=(5, 5)) -ax[0, 0].hist(data[0]) -ax[1, 0].scatter(data[0], data[1]) -ax[0, 1].plot(data[0], data[1]) - -# Log static image to Neptune -run["static-img"].upload(figure) - -# Log interactive image to Neptune -run["interactive-img"].upload(File.as_html(figure)) - -# Tracking will stop automatically once script execution is complete diff --git a/integrations-and-supported-tools/matplotlib/scripts/requirements.txt b/integrations-and-supported-tools/matplotlib/scripts/requirements.txt deleted file mode 100644 index 3d3c3413a..000000000 --- a/integrations-and-supported-tools/matplotlib/scripts/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -matplotlib -neptune -plotly diff --git a/integrations-and-supported-tools/matplotlib/scripts/run_examples.sh b/integrations-and-supported-tools/matplotlib/scripts/run_examples.sh deleted file mode 100644 index be0740011..000000000 --- a/integrations-and-supported-tools/matplotlib/scripts/run_examples.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -e - -echo "Installing requirements..." -pip install -U -r requirements.txt --user - -echo "Running Neptune_Matplotlib_Support.py..." -python Neptune_Matplotlib_Support.py diff --git a/integrations-and-supported-tools/plotly/notebooks/Neptune_Plotly_Support.ipynb b/integrations-and-supported-tools/plotly/notebooks/Neptune_Plotly_Support.ipynb deleted file mode 100644 index d5ab6d24a..000000000 --- a/integrations-and-supported-tools/plotly/notebooks/Neptune_Plotly_Support.ipynb +++ /dev/null @@ -1,292 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "![Neptune + Plotly](https://neptune.ai/wp-content/uploads/2023/09/plotly.svg)\n", - "\n", - "# Neptune + Plotly\n", - "\n", - "\n", - " \"Open\n", - "\n", - " \"Open\n", - " \n", - " \"Explore\n", - "\n", - " \"View\n", - "" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "comment" - ] - }, - "source": [ - "## Introduction\n", - "\n", - "This guide will show you how to:\n", - "\n", - "* Initialize Neptune and create a `run`,\n", - "* Log `plotly` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Before you start\n", - "\n", - "This notebook example lets you try out Neptune as an anonymous user, with zero setup.\n", - "\n", - "If you want to see the example logged to your own workspace instead:\n", - "\n", - " 1. Create a Neptune account. [Register →](https://neptune.ai/register)\n", - " 1. Create a Neptune project that you will use for tracking metadata. For instructions, see [Creating a project](https://docs.neptune.ai/setup/creating_project) in the Neptune docs." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install Neptune and dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "! pip install -U neptune plotly" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header", - "installation" - ] - }, - "source": [ - "## Import and initialize `neptune`\n", - "\n", - "To create a new run for tracking the metadata, you tell Neptune who you are (`api_token`) and where to send the data (`project`).\n", - "\n", - "You can use the default code cell below to create an anonymous run in a public project. **Note**: Public projects are cleaned regularly, so anonymous runs are only stored temporarily.\n", - "\n", - "### Log to your own project instead\n", - "\n", - "Replace the code below with the following:\n", - "\n", - "```python\n", - "import neptune\n", - "from getpass import getpass\n", - "\n", - "run = neptune.init_run(\n", - " project=\"workspace-name/project-name\", # replace with your own (see instructions below)\n", - " api_token=getpass(\"Enter your Neptune API token: \"),\n", - ")\n", - "```\n", - "\n", - "To find your API token and full project name:\n", - "\n", - "1. [Log in to Neptune](https://app.neptune.ai/).\n", - "1. In the bottom-left corner, expand your user menu and select **Get your API token**.\n", - "1. The workspace name is displayed in the top-left corner of the app. To copy the project path, in the top-right corner, open the settings menu and select **Properties**.\n", - "\n", - "For more help, see [Setting Neptune credentials](https://docs.neptune.ai/setup/setting_credentials) in the Neptune docs." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import neptune\n", - "\n", - "run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project=\"common/plotly-support\")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment", - "exclude" - ] - }, - "source": [ - "**To open the run in the Neptune web app, click the link that appeared in the cell output.**\n", - "\n", - "We'll use the `run` object we just created to log metadata. You'll see the metadata appear in the app." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "header" - ] - }, - "source": [ - "## Log `plotly` charts to Neptune" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create a sample chart" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import plotly.express as px\n", - "\n", - "df = px.data.iris()\n", - "plotly_fig = px.scatter_3d(df, x=\"sepal_length\", y=\"sepal_width\", z=\"petal_width\", color=\"species\")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Log interactive image" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run[\"interactive_img\"].upload(plotly_fig)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Stop logging\n", - "\n", - "**Warning:**
\n", - "Once you are done logging, you can stop tracking the run using the `stop()` method.\n", - "This is needed only while logging from a notebook environment. While logging through a script, Neptune automatically stops tracking once the script has completed execution." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "run.stop()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Explore the charts in Neptune\n", - "\n", - "The images can be found in the **All metadata** section \n", - "![plotly-logging.gif](https://neptune.ai/wp-content/uploads/plotly-logging.gif)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## Conclusion\n", - "\n", - "You’ve learned how to:\n", - "\n", - "* Initialize Neptune and create a run,\n", - "* Log `plotly` charts to Neptune." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [ - "comment" - ] - }, - "source": [ - "## What's next\n", - "\n", - "Now that you know how to log charts to Neptune, you can learn:\n", - "\n", - "* [How to log other types of metadata to Neptune](https://docs.neptune.ai/logging/what_you_can_log/)\n", - "* [How to download runs data from Neptune](https://docs.neptune.ai/user-guides/logging-and-managing-runs-results/downloading-runs-data)\n", - "* [How to connect Neptune to the ML framework you are using](https://docs.neptune.ai/essentials/integrations)" - ] - } - ], - "metadata": { - "colab": { - "collapsed_sections": [], - "name": "Neptune_Plotly_Support.ipynb", - "private_outputs": true, - "provenance": [], - "toc_visible": true - }, - "kernelspec": { - "display_name": "py38", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.15" - }, - "toc-autonumbering": false, - "toc-showcode": false, - "toc-showmarkdowntxt": false, - "toc-showtags": false, - "vscode": { - "interpreter": { - "hash": "a9715cf0b0024f6e1c62cb31a4f1f43970eb41991212681878768b4bfe53050a" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/integrations-and-supported-tools/plotly/scripts/Neptune_Plotly_Support.py b/integrations-and-supported-tools/plotly/scripts/Neptune_Plotly_Support.py deleted file mode 100644 index c90633e82..000000000 --- a/integrations-and-supported-tools/plotly/scripts/Neptune_Plotly_Support.py +++ /dev/null @@ -1,15 +0,0 @@ -# Import necessary libraries -import neptune -import plotly.express as px - -# Initialize Neptune and create a new run -run = neptune.init_run(api_token=neptune.ANONYMOUS_API_TOKEN, project="common/plotly-support") - -# Create a sample chart -df = px.data.iris() -plotly_fig = px.scatter_3d(df, x="sepal_length", y="sepal_width", z="petal_width", color="species") - -# Log interactive image to Neptune -run["interactive_img"].upload(plotly_fig) - -# Tracking will stop automatically once script execution is complete diff --git a/integrations-and-supported-tools/plotly/scripts/requirements.txt b/integrations-and-supported-tools/plotly/scripts/requirements.txt deleted file mode 100644 index 03d20bee9..000000000 --- a/integrations-and-supported-tools/plotly/scripts/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -neptune -plotly diff --git a/integrations-and-supported-tools/plotly/scripts/run_examples.sh b/integrations-and-supported-tools/plotly/scripts/run_examples.sh deleted file mode 100644 index 9c3d75d04..000000000 --- a/integrations-and-supported-tools/plotly/scripts/run_examples.sh +++ /dev/null @@ -1,7 +0,0 @@ -set -e - -echo "Installing requirements..." -pip install -U -r requirements.txt - -echo "Running Neptune_Plotly_Support.py..." -python Neptune_Plotly_Support.py