Lee-W commented on code in PR #76802:
URL: https://github.com/apache/airflow/pull/76802#discussion_r4717664695
##########
providers/common/ai/src/airflow/providers/common/ai/hooks/pydantic_ai.py:
##########
@@ -681,15 +682,17 @@ def ensure_model_ready(
Opt-in, blocks the worker slot, and loads only this hook's own
connection. Details and
limits: :ref:`self_hosted_models_ensure_model_ready`.
- :param timeout: Seconds to wait for the load request, passed to the
backend as is.
+ :param timeout: Seconds to wait for the load request, passed to the
backend as is. A backend
+ may spend it over several requests.
:param backend_factory: Callable that takes the keyword arguments
``model_name`` (the
resolved name without its provider prefix) and ``base_url`` (the
connection host, or
``None``) and returns an object with ``load()`` (see
ModelReadinessBackend). When
given, the model prefix and connection host checks are skipped; a
missing model still
raises ``ValueError``. See
:ref:`self_hosted_models_readiness_backend`.
:raises ValueError: If *timeout* is not a positive finite number or no
model is configured;
also from the default ``OllamaBackend`` when neither the
connection host nor the
- ``OLLAMA_BASE_URL`` environment variable is set.
+ ``OLLAMA_BASE_URL`` environment variable is set, and from
``LMStudioBackend`` when the
+ connection has no host or the model list has an unexpected shape.
Review Comment:
`:raises ValueError` now also names the case where no listed model has a
`key` equal to the model name.
--
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]