Skip to content

Commit

Permalink
update badges in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
vinid committed Jun 12, 2024
1 parent 73e47e3 commit 321ccce
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 100 deletions.
96 changes: 23 additions & 73 deletions examples/notebooks/Primitives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
"\n",
"An autograd engine -- for textual gradients!\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](LINK)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zou-group/TextGrad/blob/main/examples/notebooks/Prompt-Optimization.ipynb)\n",
"[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n",
"[![Arxiv](https://img.shields.io/badge/arXiv-2406.07496-B31B1B.svg)](https://arxiv.org/abs/2406.07496)\n",
"[![Documentation Status](https://readthedocs.org/projects/textgrad/badge/?version=latest)](https://textgrad.readthedocs.io/en/latest/?badge=latest)\n",
"[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/textgrad)](https://pypi.org/project/textgrad/)\n",
"[![PyPI](https://img.shields.io/pypi/v/textgrad)](https://pypi.org/project/textgrad/)\n",
"\n",
"**Objectives for this tutorial:**\n",
"\n",
Expand Down Expand Up @@ -59,10 +63,7 @@
"cell_type": "markdown",
"id": "8887fbed36c7daf2",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Introduction: Variable\n",
Expand All @@ -87,10 +88,7 @@
"end_time": "2024-06-11T15:43:17.669096228Z",
"start_time": "2024-06-11T15:43:17.665325560Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -106,10 +104,7 @@
"end_time": "2024-06-11T15:43:18.184004948Z",
"start_time": "2024-06-11T15:43:18.178187640Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [
{
Expand All @@ -131,10 +126,7 @@
"cell_type": "markdown",
"id": "63f6a6921a1cce6a",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Introduction: Engine\n",
Expand All @@ -151,10 +143,7 @@
"end_time": "2024-06-11T15:44:32.606319032Z",
"start_time": "2024-06-11T15:44:32.561460448Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -165,10 +154,7 @@
"cell_type": "markdown",
"id": "33c7d6eaa115cd6a",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"This object behaves like you would expect an LLM to behave: You can sample generation from the engine using the `generate` method. "
Expand All @@ -183,10 +169,7 @@
"end_time": "2024-06-11T17:29:41.108552705Z",
"start_time": "2024-06-11T17:29:40.294256814Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [
{
Expand All @@ -208,10 +191,7 @@
"cell_type": "markdown",
"id": "b627edc07c0d3737",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Introduction: Loss\n",
Expand All @@ -228,10 +208,7 @@
"end_time": "2024-06-11T15:44:32.894722136Z",
"start_time": "2024-06-11T15:44:32.890708561Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -243,21 +220,15 @@
"cell_type": "markdown",
"id": "ff137c99e0659dcc",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": []
},
{
"cell_type": "markdown",
"id": "6f05ec2bf907b3ba",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Introduction: Optimizer\n",
Expand All @@ -276,10 +247,7 @@
"end_time": "2024-06-11T15:44:33.741130951Z",
"start_time": "2024-06-11T15:44:33.734977769Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -290,10 +258,7 @@
"cell_type": "markdown",
"id": "d26883eb74ce0d01",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Putting it all together\n",
Expand All @@ -310,10 +275,7 @@
"end_time": "2024-06-11T15:44:41.730132530Z",
"start_time": "2024-06-11T15:44:34.997777872Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -331,10 +293,7 @@
"end_time": "2024-06-11T15:44:41.738985151Z",
"start_time": "2024-06-11T15:44:41.731989729Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [
{
Expand All @@ -356,10 +315,7 @@
"cell_type": "markdown",
"id": "6a8aab93b80fb82c",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"While here it is not going to be useful, we can also do multiple optimization steps in a loop! Do not forget to reset the gradients after each step!"
Expand All @@ -373,10 +329,7 @@
"ExecuteTime": {
"start_time": "2024-06-11T15:44:30.989940227Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -388,10 +341,7 @@
"execution_count": null,
"id": "a3a84aad4cd58737",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": []
Expand Down
26 changes: 9 additions & 17 deletions examples/notebooks/Prompt-Optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
"\n",
"An autograd engine -- for textual gradients!\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](LINK)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zou-group/TextGrad/blob/main/examples/notebooks/Prompt-Optimization.ipynb)\n",
"[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n",
"[![Arxiv](https://img.shields.io/badge/arXiv-2406.07496-B31B1B.svg)](https://arxiv.org/abs/2406.07496)\n",
"[![Documentation Status](https://readthedocs.org/projects/textgrad/badge/?version=latest)](https://textgrad.readthedocs.io/en/latest/?badge=latest)\n",
"[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/textgrad)](https://pypi.org/project/textgrad/)\n",
"[![PyPI](https://img.shields.io/pypi/v/textgrad)](https://pypi.org/project/textgrad/)\n",
"\n",
"**Objectives:**\n",
"\n",
Expand Down Expand Up @@ -74,10 +78,7 @@
"end_time": "2024-06-11T19:30:42.098338405Z",
"start_time": "2024-06-11T19:30:42.093473103Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -91,10 +92,7 @@
"execution_count": 9,
"id": "649e06aef34d0990",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -121,10 +119,7 @@
"execution_count": 10,
"id": "9559a31e07e54d7f",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -153,10 +148,7 @@
"execution_count": 11,
"id": "4ea732b7edf34eb9",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand Down
16 changes: 7 additions & 9 deletions examples/notebooks/Tutorial-Solution-Optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"cell_type": "markdown",
"id": "fe4cb25e4fb45586",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"source": [
"## Tutorial: Running Solution Optimization\n",
Expand All @@ -16,8 +13,12 @@
"\n",
"An autograd engine -- for textual gradients!\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](LINK)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zou-group/TextGrad/blob/main/examples/notebooks/Prompt-Optimization.ipynb)\n",
"[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n",
"[![Arxiv](https://img.shields.io/badge/arXiv-2406.07496-B31B1B.svg)](https://arxiv.org/abs/2406.07496)\n",
"[![Documentation Status](https://readthedocs.org/projects/textgrad/badge/?version=latest)](https://textgrad.readthedocs.io/en/latest/?badge=latest)\n",
"[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/textgrad)](https://pypi.org/project/textgrad/)\n",
"[![PyPI](https://img.shields.io/pypi/v/textgrad)](https://pypi.org/project/textgrad/)\n",
"\n",
"**Objectives:**\n",
"\n",
Expand All @@ -33,10 +34,7 @@
"execution_count": null,
"id": "1f6e021565d0c914",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
"collapsed": false
},
"outputs": [],
"source": [
Expand Down
6 changes: 5 additions & 1 deletion examples/notebooks/Tutorial-Test-Time-Loss-for-Code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
"\n",
"An autograd engine -- for textual gradients!\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](LINK)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zou-group/TextGrad/blob/main/examples/notebooks/Prompt-Optimization.ipynb)\n",
"[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n",
"[![Arxiv](https://img.shields.io/badge/arXiv-2406.07496-B31B1B.svg)](https://arxiv.org/abs/2406.07496)\n",
"[![Documentation Status](https://readthedocs.org/projects/textgrad/badge/?version=latest)](https://textgrad.readthedocs.io/en/latest/?badge=latest)\n",
"[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/textgrad)](https://pypi.org/project/textgrad/)\n",
"[![PyPI](https://img.shields.io/pypi/v/textgrad)](https://pypi.org/project/textgrad/)\n",
"\n",
"**Objectives:**\n",
"\n",
Expand Down

0 comments on commit 321ccce

Please sign in to comment.