最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - filter amazon jumpstart models - Stack Overflow

programmeradmin0浏览0评论

I found this block of code that allows me to list all of the available jumpstart models in AWS. I wanted to find a list of the key words that I could filter by and the values. Does this exsist somewhere? If not how would I filter the models for ones that are fine tunable.

import IPython
import ipywidgets as widgets
from sagemaker.jumpstart.notebook_utils import list_jumpstart_models
from sagemaker.jumpstart.filters import And, Or

# Retrieves all TensorFlow Object Detection models.
filter_value = Or(
    And("task == od1", "framework == tensorflow"), And("task == od", "framework == tensorflow")
)

model_id, model_version = "tensorflow-od1-ssd-resnet50-v1-fpn-640x640-coco17-tpu-8", "*"

tensorflow_od_models = list_jumpstart_models(filter=filter_value)
# display the model-ids in a dropdown, for user to select a model.
dropdown = widgets.Dropdown(
    options=tensorflow_od_models,
    value=model_id,
    description="SageMaker Built-In TensorFlow Object Detection Models:",
    style={"description_width": "initial"},
    layout={"width": "max-content"},
)
display(IPython.display.Markdown("## Select a SageMaker pre-trained model from the dropdown below"))
display(dropdown)

So specefically how do adjust this line to find finetunable/trainable models:

filter_value = Or(And("task == od1", "framework == tensorflow"), And("task == od", "framework == tensorflow"))
发布评论

评论列表(0)

  1. 暂无评论