-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7843a2e
commit fac7737
Showing
97 changed files
with
305 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,161 +1,161 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 61, | ||
"id": "314bb6b4", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import typing\n", | ||
"\n", | ||
"import weave\n", | ||
"from weave import weave_internal\n", | ||
"\n", | ||
"weave.use_frontend_devmode()\n", | ||
"from weave.legacy import ops_domain\n", | ||
"from weave.legacy.panels import panel_board" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 62, | ||
"id": "550daef6", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"@weave.type()\n", | ||
"class Dataset:\n", | ||
" rows: list[typing.Any]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 64, | ||
"id": "e8065ad6", | ||
"metadata": {}, | ||
"outputs": [ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 61, | ||
"id": "314bb6b4", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import typing\n", | ||
"\n", | ||
"import weave\n", | ||
"from weave.legacy import weave_internal\n", | ||
"\n", | ||
"weave.use_frontend_devmode()\n", | ||
"from weave.legacy import ops_domain\n", | ||
"from weave.legacy.panels import panel_board" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <iframe\n", | ||
" width=\"100%\"\n", | ||
" height=\"400px\"\n", | ||
" src=\"http://localhost:3000/__frontend/weave_jupyter?fullScreen&expNode=%7B%22nodeType%22%3A%20%22output%22%2C%20%22type%22%3A%20%22any%22%2C%20%22fromOp%22%3A%20%7B%22name%22%3A%20%22get%22%2C%20%22inputs%22%3A%20%7B%22uri%22%3A%20%7B%22nodeType%22%3A%20%22const%22%2C%20%22type%22%3A%20%22string%22%2C%20%22val%22%3A%20%22local-artifact%3A///dashboard-Group0%3Alatest/obj%22%7D%7D%7D%7D\"\n", | ||
" frameborder=\"0\"\n", | ||
" allowfullscreen\n", | ||
" allow=\"clipboard-write\"\n", | ||
" ></iframe>\n", | ||
" " | ||
"cell_type": "code", | ||
"execution_count": 62, | ||
"id": "550daef6", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"@weave.type()\n", | ||
"class Dataset:\n", | ||
" rows: list[typing.Any]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 64, | ||
"id": "e8065ad6", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <iframe\n", | ||
" width=\"100%\"\n", | ||
" height=\"400px\"\n", | ||
" src=\"http://localhost:3000/__frontend/weave_jupyter?fullScreen&expNode=%7B%22nodeType%22%3A%20%22output%22%2C%20%22type%22%3A%20%22any%22%2C%20%22fromOp%22%3A%20%7B%22name%22%3A%20%22get%22%2C%20%22inputs%22%3A%20%7B%22uri%22%3A%20%7B%22nodeType%22%3A%20%22const%22%2C%20%22type%22%3A%20%22string%22%2C%20%22val%22%3A%20%22local-artifact%3A///dashboard-Group0%3Alatest/obj%22%7D%7D%7D%7D\"\n", | ||
" frameborder=\"0\"\n", | ||
" allowfullscreen\n", | ||
" allow=\"clipboard-write\"\n", | ||
" ></iframe>\n", | ||
" " | ||
], | ||
"text/plain": [ | ||
"<IPython.lib.display.IFrame at 0x2dbee55b0>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"text/plain": [ | ||
"<IPython.lib.display.IFrame at 0x2dbee55b0>" | ||
"source": [ | ||
"varbar = panel_board.varbar()\n", | ||
"\n", | ||
"entity_name_val = varbar.add(\"entity_name_val\", \"shawn\", hidden=True)\n", | ||
"entity = ops_domain.entity(entity_name_val)\n", | ||
"entity_name = varbar.add(\n", | ||
" \"entity_name\",\n", | ||
" weave.legacy.panels.Dropdown(\n", | ||
" entity_name_val, choices=ops_domain.viewer().entities().name()\n", | ||
" ),\n", | ||
")\n", | ||
"\n", | ||
"project_name_val = varbar.add(\"project_name_val\", \"weave-flow1\", hidden=True)\n", | ||
"project = ops_domain.project(entity_name_val, project_name_val)\n", | ||
"project_name = varbar.add(\n", | ||
" \"project_name\",\n", | ||
" weave.legacy.panels.Dropdown(project_name_val, choices=entity.projects().name()),\n", | ||
")\n", | ||
"\n", | ||
"dataset_name_val = varbar.add(\"dataset_name_val\", \"my_dataset1\", hidden=True)\n", | ||
"dataset = varbar.add(\n", | ||
" \"dataset\",\n", | ||
" weave.legacy.ops.get(\n", | ||
" weave_internal.const(\"wandb-artifact:///\")\n", | ||
" + entity_name_val\n", | ||
" + \"/\"\n", | ||
" + project_name_val\n", | ||
" + \"/\"\n", | ||
" + dataset_name_val\n", | ||
" + \":latest/obj\"\n", | ||
" ),\n", | ||
" hidden=True,\n", | ||
")\n", | ||
"dataset_ref = varbar.add(\n", | ||
" \"dataset_ref\",\n", | ||
" weave.legacy.ops.ref(\n", | ||
" weave_internal.const(\"wandb-artifact:///\")\n", | ||
" + entity_name_val\n", | ||
" + \"/\"\n", | ||
" + project_name_val\n", | ||
" + \"/\"\n", | ||
" + dataset_name_val\n", | ||
" + \":latest/obj\"\n", | ||
" ),\n", | ||
")\n", | ||
"dataset_name = varbar.add(\n", | ||
" \"dataset_name\",\n", | ||
" weave.legacy.panels.Dropdown(\n", | ||
" dataset_name_val, choices=project.artifactType(\"Dataset\").artifacts().name()\n", | ||
" ),\n", | ||
")\n", | ||
"\n", | ||
"# Now here I want to pick model A and model B\n", | ||
"# I need to a way to get to artifact from an object, like get_ref.artifact ?\n", | ||
"# like dataset_ref.artifact().usedBy().filter(lambda row: row.jobName() == 'eval')\n", | ||
"# then from there find consuming runs of a given job_type (\"eval\")\n", | ||
"# let the user pick two of those\n", | ||
"\n", | ||
"# want a really nice data grid of the table metric comparsion per row\n", | ||
"\n", | ||
"main = weave.legacy.panels.Group(\n", | ||
" layoutMode=\"grid\",\n", | ||
" showExpressions=True,\n", | ||
" enableAddPanel=True,\n", | ||
")\n", | ||
"\n", | ||
"main.add(\"ename\", entity_name_val)\n", | ||
"main.add(\"pname\", project_name_val)\n", | ||
"main.add(\"dsrows\", weave.legacy.ops.obj_getattr(dataset, \"rows\"))\n", | ||
"# main.add(\"artifact\", dataset_ref.artifact())\n", | ||
"\n", | ||
"# I Need a programmable Table. One that's columns are defined by Nodes\n", | ||
"# Same for panels, I want to be able to generate a bunch of panels\n", | ||
"# Can I do this with Weaveify?\n", | ||
"# Like I can pass a function in in the Board that returns the panel I want maybe?\n", | ||
"\n", | ||
"weave.legacy.panels.Board(vars=varbar, panels=main)" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"varbar = panel_board.varbar()\n", | ||
"\n", | ||
"entity_name_val = varbar.add(\"entity_name_val\", \"shawn\", hidden=True)\n", | ||
"entity = ops_domain.entity(entity_name_val)\n", | ||
"entity_name = varbar.add(\n", | ||
" \"entity_name\",\n", | ||
" weave.legacy.panels.Dropdown(\n", | ||
" entity_name_val, choices=ops_domain.viewer().entities().name()\n", | ||
" ),\n", | ||
")\n", | ||
"\n", | ||
"project_name_val = varbar.add(\"project_name_val\", \"weave-flow1\", hidden=True)\n", | ||
"project = ops_domain.project(entity_name_val, project_name_val)\n", | ||
"project_name = varbar.add(\n", | ||
" \"project_name\",\n", | ||
" weave.legacy.panels.Dropdown(project_name_val, choices=entity.projects().name()),\n", | ||
")\n", | ||
"\n", | ||
"dataset_name_val = varbar.add(\"dataset_name_val\", \"my_dataset1\", hidden=True)\n", | ||
"dataset = varbar.add(\n", | ||
" \"dataset\",\n", | ||
" weave.legacy.ops.get(\n", | ||
" weave_internal.const(\"wandb-artifact:///\")\n", | ||
" + entity_name_val\n", | ||
" + \"/\"\n", | ||
" + project_name_val\n", | ||
" + \"/\"\n", | ||
" + dataset_name_val\n", | ||
" + \":latest/obj\"\n", | ||
" ),\n", | ||
" hidden=True,\n", | ||
")\n", | ||
"dataset_ref = varbar.add(\n", | ||
" \"dataset_ref\",\n", | ||
" weave.legacy.ops.ref(\n", | ||
" weave_internal.const(\"wandb-artifact:///\")\n", | ||
" + entity_name_val\n", | ||
" + \"/\"\n", | ||
" + project_name_val\n", | ||
" + \"/\"\n", | ||
" + dataset_name_val\n", | ||
" + \":latest/obj\"\n", | ||
" ),\n", | ||
")\n", | ||
"dataset_name = varbar.add(\n", | ||
" \"dataset_name\",\n", | ||
" weave.legacy.panels.Dropdown(\n", | ||
" dataset_name_val, choices=project.artifactType(\"Dataset\").artifacts().name()\n", | ||
" ),\n", | ||
")\n", | ||
"\n", | ||
"# Now here I want to pick model A and model B\n", | ||
"# I need to a way to get to artifact from an object, like get_ref.artifact ?\n", | ||
"# like dataset_ref.artifact().usedBy().filter(lambda row: row.jobName() == 'eval')\n", | ||
"# then from there find consuming runs of a given job_type (\"eval\")\n", | ||
"# let the user pick two of those\n", | ||
"\n", | ||
"# want a really nice data grid of the table metric comparsion per row\n", | ||
"\n", | ||
"main = weave.legacy.panels.Group(\n", | ||
" layoutMode=\"grid\",\n", | ||
" showExpressions=True,\n", | ||
" enableAddPanel=True,\n", | ||
")\n", | ||
"\n", | ||
"main.add(\"ename\", entity_name_val)\n", | ||
"main.add(\"pname\", project_name_val)\n", | ||
"main.add(\"dsrows\", weave.legacy.ops.obj_getattr(dataset, \"rows\"))\n", | ||
"# main.add(\"artifact\", dataset_ref.artifact())\n", | ||
"\n", | ||
"# I Need a programmable Table. One that's columns are defined by Nodes\n", | ||
"# Same for panels, I want to be able to generate a bunch of panels\n", | ||
"# Can I do this with Weaveify?\n", | ||
"# Like I can pass a function in in the Board that returns the panel I want maybe?\n", | ||
"\n", | ||
"weave.legacy.panels.Board(vars=varbar, panels=main)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"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.9.7" | ||
} | ||
}, | ||
"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.9.7" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.