olegkachur-e commented on code in PR #68665:
URL: https://github.com/apache/airflow/pull/68665#discussion_r3588227448
##########
providers/google/tests/system/google/cloud/gen_ai/example_gen_ai_generative_model_tuning.py:
##########
@@ -118,16 +126,21 @@ def _get_actual_model(key) -> str:
) as dag:
@task
- def get_gemini_api_key():
- return get_secret(GEMINI_API_KEY)
-
- get_gemini_api_key_task = get_gemini_api_key()
-
- @task
- def get_actual_model(key):
- return _get_actual_model(key)
-
- get_actual_model_task = get_actual_model(get_gemini_api_key_task)
+ def get_actual_model():
+ latest_available_model = max(
+ filter(lambda model: model["sft_availability"] ==
"GenerallyAvailable", STABLE_SFT_MODELS),
+ key=lambda model: model["guaranteed_until"],
+ )
Review Comment:
Sounds reasonable, I'll prioritize budget optimal model first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]