Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import argparse
import asyncio
import json
import logging
import os
import signal
import sys
Expand Down Expand Up @@ -56,6 +57,8 @@

CLI_CONFIG_PATH = Path(__file__).parent.parent / "configs" / "cli_agent_config.json"

logger = logging.getLogger(__name__)


def _is_scheduled_hf_job_tool(tool_info: dict[str, Any]) -> bool:
if tool_info.get("tool") != "hf_jobs":
Expand Down Expand Up @@ -97,6 +100,7 @@ def _get_hf_user(token: str | None) -> str | None:

return HfApi(token=token).whoami().get("name")
except Exception:
logger.exception("HF whoami failed while resolving username for token")
return None


Expand Down
Loading