Skip to content

Commit 2aa1491

Browse files
committed
refactor: type RunnerFactory.create_model/agent returns as Optional[Runner]
The factory's downstream consumers (ManagedModel, ManagedAgent) now take Runner; aligning the factory's return types lets us drop the type: ignore comments at the ManagedModel/ManagedAgent call sites. Provider package PRs will update their concrete implementations to match. Judge still takes ModelRunner, so its call site picks up the type: ignore[arg-type] in its place — that's resolved later in the cleanup PR when Judge migrates to Runner.
1 parent 06e324f commit 2aa1491

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/sdk/server-ai/src/ldai/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@ def _create_judge_instance(
339339
if not provider:
340340
return None
341341

342-
return Judge(judge_config, provider, sample_rate=sample_rate)
343-
except Exception as e:
344-
log.warning('Failed to initialize judge %r: %s', key, e)
342+
return Judge(judge_config, provider, sample_rate=sample_rate) # type: ignore[arg-type]
343+
except Exception as error:
345344
return None
346345

347346
def _build_evaluator(

0 commit comments

Comments
 (0)