nemo_gym.base_resources_server
nemo_gym.base_resources_server
Module Contents
Classes
Functions
Data
NEMO_GYM_MCP_SESSION_TOKEN_HEADER
API
Bases: BaseServer
Bases: BaseRunServerInstanceConfig
Bases: BaseModel
Bases: BaseModel
Bases: BaseModel
Bases: BaseRunRequest
Bases: BaseVerifyRequest
Bases: BaseModel
Metadata returned from /seed_session for per-rollout Gym MCP access.
Bases: BaseResourcesServer, AggregateMetricsMixin, SimpleServer
Compute aggregate metrics from verify responses.
RewardProfiler provides baseline stats. Override compute_metrics() and/or get_key_metrics() for benchmark-specific customization.
Per-session tool restriction: return the tool names allowed for this rollout’s MCP token,
or None (the default) for unrestricted. seed_body is the JSON body POSTed to
/seed_session.
Return the MCP tools to expose (default: the auto-harvested typed POST routes).
Override to exclude (filter harvested), add catch-all-backed tools (harvested + [catchall.tool(…)]), or disable (return None). ‘catchall’ is None unless the server has one parameterized catch-all route.
Strip this server’s MCP namespace from a trajectory tool-call name (see module function).
Map a trajectory tool-call name to the server’s bare tool name.
HTTP-driven agents record bare tool names (“email_reply_email”); MCP-native agents (e.g.
Claude Code) record them namespaced per server (“mcp__workplace_assistant__email_reply_email”).
Verifiers compare trajectory names against dataset/ground-truth vocabulary, so names are
normalized before verify sees them and rollouts score identically on both transports.
Non-namespaced names pass through unchanged. When server_name is given, only that server’s
prefix is stripped (robust to tool names that themselves contain double underscores).
This runs only for servers exposed over MCP and mirrors how MCP clients namespace tool names,
so a real tool that is itself named mcp__<server>__x being stripped is accepted.