Skip to content

Commit

Permalink
fix(genai_core): handling bad FMs (improved finetuned)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingquaks authored and bigadsoleiman committed Dec 4, 2023
1 parent f5e4440 commit ac40a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shared/layers/python-sdk/python/genai_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def list_bedrock_finetuned_models():
}
for model in bedrock_custom_models
# Exclude embeddings and stable diffusion models
if model.get("inputModalities", None) != None
and model.get("outputModalities", None) != None
if "inputModalities" in model
and "outputModalities" in model
and Modality.EMBEDDING.value not in model.get("outputModalities", [])
and Modality.IMAGE.value not in model.get("outputModalities", [])
]
Expand Down

0 comments on commit ac40a86

Please sign in to comment.