Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
65 changes: 15 additions & 50 deletions src/agentlab/agents/generic_agent_hinter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,54 +1,19 @@
"""
Baseline agent for all ServiceNow papers
import importlib, sys, warnings

This module contains the GenericAgent class, which is the baseline agent for all ServiceNow papers. \
It is a simple agent that can be ran OOB on all BrowserGym environments. It is also shipped with \
a few configurations that can be used to run it on different environments.
"""
OLD = __name__
NEW = "agentlab.agents.hint_use_agent"
SUBS = ("agent_configs", "generic_agent_prompt", "generic_agent", "tmlr_config")

from .agent_configs import (
AGENT_3_5,
AGENT_8B,
AGENT_37_SONNET,
AGENT_CLAUDE_SONNET_35,
AGENT_CLAUDE_SONNET_35_VISION,
AGENT_CUSTOM,
AGENT_GPT5_MINI,
AGENT_GPT5_NANO,
AGENT_LLAMA3_70B,
AGENT_LLAMA4_17B_INSTRUCT,
AGENT_LLAMA31_70B,
CHAT_MODEL_ARGS_DICT,
RANDOM_SEARCH_AGENT,
AGENT_4o,
AGENT_4o_MINI,
AGENT_4o_MINI_VISION,
AGENT_4o_VISION,
AGENT_o1_MINI,
AGENT_o3_MINI,
FLAGS_GPT_4o,
GenericAgentArgs,
warnings.warn(
f"{OLD} is renamed to {NEW}. {OLD} will be removed in future",
DeprecationWarning,
stacklevel=2,
)
Comment on lines +7 to 11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecation notice not logged category Logging

Tell me more
What is the issue?

The code uses a warning to log the deprecation notice, which may not be captured in standard logging systems.

Why this matters

Warnings might be suppressed or not visible in production environments, potentially leading to missed deprecation notices.

Suggested change ∙ Feature Preview

Add a logging statement in addition to the warning:

import logging

logging.warning(f"{OLD} is renamed to {NEW}. {OLD} will be removed in future")
warnings.warn(
    f"{OLD} is renamed to {NEW}. {OLD} will be removed in future",
    DeprecationWarning,
    stacklevel=2,
)
Provide feedback to improve future suggestions

Nice Catch Incorrect Not in Scope Not in coding standard Other

💬 Looking for more details? Reply to this comment to chat with Korbit.

from .generic_agent import GenericAgent, GenericAgentArgs

__all__ = [
"AGENT_3_5",
"AGENT_4o",
"AGENT_4o_MINI",
"AGENT_4o_VISION",
"AGENT_o3_MINI",
"AGENT_o1_MINI",
"AGENT_LLAMA4_17B_INSTRUCT",
"AGENT_LLAMA3_70B",
"AGENT_LLAMA31_70B",
"AGENT_8B",
"RANDOM_SEARCH_AGENT",
"AGENT_CUSTOM",
"AGENT_CLAUDE_SONNET_35",
"AGENT_37_SONNET",
"AGENT_4o_VISION",
"AGENT_4o_MINI_VISION",
"AGENT_CLAUDE_SONNET_35_VISION",
"AGENT_GPT5_MINI",
"AGENT_GPT5_NANO",
]
# Alias the top-level
new_mod = importlib.import_module(NEW)
sys.modules[OLD] = new_mod

# Alias known submodules
for sub in SUBS:
sys.modules[f"{OLD}.{sub}"] = importlib.import_module(f"{NEW}.{sub}")
Comment on lines +13 to +19

This comment was marked as off-topic.

54 changes: 54 additions & 0 deletions src/agentlab/agents/hint_use_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""
Baseline agent for all ServiceNow papers

This module contains the GenericAgent class, which is the baseline agent for all ServiceNow papers. \
It is a simple agent that can be ran OOB on all BrowserGym environments. It is also shipped with \
a few configurations that can be used to run it on different environments.
"""

from .agent_configs import (
AGENT_3_5,
AGENT_8B,
AGENT_37_SONNET,
AGENT_CLAUDE_SONNET_35,
AGENT_CLAUDE_SONNET_35_VISION,
AGENT_CUSTOM,
AGENT_GPT5_MINI,
AGENT_GPT5_NANO,
AGENT_LLAMA3_70B,
AGENT_LLAMA4_17B_INSTRUCT,
AGENT_LLAMA31_70B,
CHAT_MODEL_ARGS_DICT,
RANDOM_SEARCH_AGENT,
AGENT_4o,
AGENT_4o_MINI,
AGENT_4o_MINI_VISION,
AGENT_4o_VISION,
AGENT_o1_MINI,
AGENT_o3_MINI,
FLAGS_GPT_4o,
GenericAgentArgs,
)
from .generic_agent import GenericAgent, GenericAgentArgs

__all__ = [
"AGENT_3_5",
"AGENT_4o",
"AGENT_4o_MINI",
"AGENT_4o_VISION",
"AGENT_o3_MINI",
"AGENT_o1_MINI",
"AGENT_LLAMA4_17B_INSTRUCT",
"AGENT_LLAMA3_70B",
"AGENT_LLAMA31_70B",
"AGENT_8B",
"RANDOM_SEARCH_AGENT",
"AGENT_CUSTOM",
"AGENT_CLAUDE_SONNET_35",
"AGENT_37_SONNET",
"AGENT_4o_VISION",
"AGENT_4o_MINI_VISION",
"AGENT_CLAUDE_SONNET_35_VISION",
"AGENT_GPT5_MINI",
"AGENT_GPT5_NANO",
]
Loading