-
Notifications
You must be signed in to change notification settings - Fork 21
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
WIP Model card #53
WIP Model card #53
Conversation
I checked out from my documentation PR, feel free to ignore the parts about adding docstrings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far.
Did you use the model card utility as a part of the pipeline yet?
No worries, if not. I was just being curious.
model_metadata (dict): Dict of card metadata. | ||
see here for what you can pass to the metadata section: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include descriptions about the other arguments too.
""" | ||
if model_metadata is None: | ||
model_metadata = {} | ||
model_metadata["library_name"] = "vertex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If one runs the pipeline on a different orchestrator then vertex
won't make sense. Also, it's better to call the key orchestrator
or runner
to denote that it's the platform on which things are getting executed.
@@ -0,0 +1,27 @@ | |||
--- | |||
# For reference on model card metadata, see: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see => refer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
||
## Model Description | ||
|
||
This is a {{ task | default("segmentation")}} model trained using Vertex AI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're not using Vertex AI, then it doesn't make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this project specifically made for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project can be run any compatible platform. We ran it locally and Vertex AI.
Cc: @deep-diver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is. the pipeline has two targets, Local and Vertex AI (which is Kubeflow 2.x). Better to say something like model trained using TensorFlow Extended
@@ -0,0 +1,27 @@ | |||
--- | |||
# For reference on model card metadata, see: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this link also show how we can specify the formatting like:
This is a {{ task | default("segmentation")}} model trained using Vertex AI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just shows the keys, so nope.
it's a jinja template, I can add that as a note.
Co-authored-by: Sayak Paul <[email protected]>
It looks good as a starting point. I just want to ask to add a notebook that shows before and after running |
@deep-diver sure I'll do that 🙂 |
@merveenoyan thanks! that would be great 👍🏼 |
@merveenoyan is finishing the first version of the model card feature in this PR. She wanted to test Do you have any starter notebook which she could use? |
The revision of the test repository lies here, I tested like below (thought it would be good to test deployment in isolation but there might be a problem with import tensorflow as tf
from runner import deploy_model_for_hf_hub
model = model_init() # random dummy model
model.save("./model_save_dir")
model_card_metadata = {}
deploy_model_for_hf_hub(
username="merve",
access_token=access_token,
repo_name="tfx-blessed-model",
model_path="./model_save_dir",
model_version="merve"
) |
@deep-diver had to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this!
Will defer to @deep-diver for the final merge.
Closes #43 |
Let's merge this PR as a starting point. @merveenoyan @sayakpaul There is a couple of things to mention/check:
|
This is a WIP for model card. Opening this PR so you could take a quick look to see if the behavior seems good.
I will add what I can add on top of it (Evaluation results, model plot and so on)