Skip to content

Commit

Permalink
Merge branch 'main' of github.com:microsoft/Trace into main
Browse files Browse the repository at this point in the history
  • Loading branch information
chinganc committed Jul 23, 2024
2 parents 306f954 + 2d73d3c commit 0806a1d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ html:
extra_footer: "<a href='mailto:[email protected]'>Contact Us</a> | <a href='http://go.microsoft.com/fwlink/?LinkId=521839'>Privacy &amp; Cookies</a> | <a href='https://go.microsoft.com/fwlink/?linkid=2259814'>Consumer Health Privacy</a> | <a href='https://go.microsoft.com/fwlink/?LinkID=206977'>Terms Of Use</a> | <a href='https://www.microsoft.com/trademarks'>Trademarks</a>"

sphinx:
html_context:
default_mode: light
extra_extensions:
- autodoc2
config:
Expand Down
8 changes: 8 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@
.admonition, div.admonition {
background-color: #eef9fd;
border-color: #4cb3d4;
}

.admonition p {
color: #474747;
}

.text_html p {
color: #474747;
}
Binary file modified docs/images/agent_workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/tutorials/basic_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
"\n",
"In addition to magic methods, we can use `bundle` to write custom methods that are traceable. When decorating a method with `bundle`, it needs a description of the method. It has a format of `[method_name] description`. `bundle` will automatically add all nodes whose `data` attribute is used within the function as the parents of the output `MessageNode`.\n",
"\n",
"Given a function `fun`, the decorated function `bundle(description)(fun)` by default will unpack all the inputs (i.e. it unpacks all the data inside nodes), send them to `fun`, and then creates a `MessageNode` to wrap the output of `fun` which has parents containing all the nodes used in this operation. "
"Given a function `fun`, the decorated function by default will unpack all the inputs (i.e. it unpacks all the data inside nodes), send them to `fun`, and then creates a `MessageNode` to wrap the output of `fun` which has parents containing all the nodes used in this operation. "
]
},
{
Expand Down Expand Up @@ -900,7 +900,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "newtrace",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -914,7 +914,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
18 changes: 9 additions & 9 deletions docs/tutorials/quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"In order for the optimization code to run, create a file with name `OAI_CONFIG_LIST` in the same folder as this notebook. This file should look the same as [OAI_CONFIG_LIST](https://github.com/microsoft/autogen/blob/main/OAI_CONFIG_LIST_sample).\n",
"\n",
"The code below looks like any PyTorch code. We can break it down to a few steps:\n",
"1. We first create an optimizer from `opto.optimizers.FunctionOptimizer`.\n",
"1. We first import an optimizer from `opto.optimizers.OptoPrime`.\n",
"2. The bundled function `strange_sort_list` has a convenience method `.parameters()` for us to grab all the trainable parameters in it. In this case, the trainable parameter is just the function code itself.\n",
"3. We need to perform `backward` pass on a `MessageNode` object, which is `correctness`. We also need to pass in the `feedback` into the optimizer as well.\n",
"4. We call `optimizer.step()` to perform the actual optimization"
Expand Down Expand Up @@ -541,6 +541,14 @@
"print(new_test_output)"
]
},
{
"cell_type": "markdown",
"id": "afd8d1b8-7d88-40c3-b1eb-6abd85edfad7",
"metadata": {},
"source": [
"**Now the answer is correct!** (alternating numbers between min, max, min, max!)"
]
},
{
"cell_type": "markdown",
"id": "a58756c0-c740-4d8e-850b-4c14a5f80486",
Expand Down Expand Up @@ -570,14 +578,6 @@
"\n",
"The functionalities provided by Trace seem simple and straightforward right now. But using these as basic building blocks, we can construct LLM-based workflow that is complex and mind-blowing. Continue to the next section to find out!"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "691b2644-324b-4cd8-a12a-69aa8d5eb094",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 0806a1d

Please sign in to comment.