mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix(mavvrik): fix mypy type errors in __init__.py
- Change type: ignore[union-attr] → type: ignore[attr-defined] for scheduler.add_job() call - Fix float+Decimal operand error by casting each polars sum() separately with int() Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
82ef2acbbf
commit
6b317c5a81
1 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ def _schedule_job(
|
|||
)
|
||||
uploader = Uploader(client=client)
|
||||
orchestrator = Orchestrator(client=client, uploader=uploader)
|
||||
scheduler.add_job( # type: ignore[union-attr]
|
||||
scheduler.add_job( # type: ignore[attr-defined]
|
||||
orchestrator.run,
|
||||
"interval",
|
||||
minutes=MAVVRIK_EXPORT_INTERVAL_MINUTES,
|
||||
|
|
@ -411,7 +411,7 @@ class Service:
|
|||
|
||||
total_cost = float(df["spend"].sum() or 0.0) if "spend" in df.columns else 0.0
|
||||
total_tokens = (
|
||||
int((df["prompt_tokens"].sum() or 0) + (df["completion_tokens"].sum() or 0))
|
||||
int(df["prompt_tokens"].sum() or 0) + int(df["completion_tokens"].sum() or 0)
|
||||
if "prompt_tokens" in df.columns and "completion_tokens" in df.columns
|
||||
else 0
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue