-
Notifications
You must be signed in to change notification settings - Fork 10
Client: Model artifact remaining changes #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
636e20c
Alias github_url to code_url
mercuryseries 2dcf287
wip tutorial
mercuryseries 3444f64
Alias paper_url to report_url
mercuryseries 1bef772
Add list_models method in client
mercuryseries 19cef26
Update docstring
mercuryseries 62eb98c
Make use of artifactId
mercuryseries 93d7af1
fix url
mercuryseries abdcdbd
update tutorial
mercuryseries 5927317
fix error: BenchmarkV2Specification() got multiple values for keyword…
mercuryseries 9d3385a
add model_artifact_id computed property
mercuryseries 624b092
fix typing
mercuryseries 36d702c
update tutorial
mercuryseries c07a41c
Fix maximum recursion depth exceeded by making a shallow copy instead…
mercuryseries af2e665
merge main and fix conflicts
mercuryseries ead7554
Merge branch 'main' into model-artifact-remaining-changes
mercuryseries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "A model in Polaris centralizes all data about a method and can be attached to different results.\n", | ||
| "\n", | ||
| "## Create a Model\n", | ||
| "\n", | ||
| "To create a model, you need to instantiate the `Model` class. " | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "from polaris.model import Model\n", | ||
| "\n", | ||
| "# Create a new Model Card\n", | ||
| "model = Model(\n", | ||
| " name=\"MolGPS\", \n", | ||
| " description=\"Graph transformer foundation model for molecular modeling\",\n", | ||
| " code_url=\"https://github.com/datamol-io/graphium\"\n", | ||
| ")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Share your model\n", | ||
| "Want to share your model with the community? Upload it to the Polaris Hub!" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "model.upload_to_hub(owner=\"your-username\")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Attach a model with a result\n", | ||
| "\n", | ||
| "The model card can then be attached to a newly created result on upload." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "from polaris import load_benchmark, load_model\n", | ||
| "\n", | ||
| "# Load a benchmark\n", | ||
| "benchmark = load_benchmark(\"polaris/hello-world-benchmark\")\n", | ||
| "\n", | ||
| "# Get the results\n", | ||
| "results = benchmark.evaluate(...)\n", | ||
| "\n", | ||
| "# Attach it to the result\n", | ||
| "results.model = load_model(\"recursion/MolGPS\")\n", | ||
| "\n", | ||
| "# Upload the results\n", | ||
| "results.upload_to_hub(owner=\"your-username\")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "---\n", | ||
| "\n", | ||
| "The End. " | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": ".venv", | ||
| "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.12.0" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 2 | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.