SYMBOL INDEX (1696 symbols across 213 files) FILE: dev/demo_logging.py function demo_basic_logging (line 9) | def demo_basic_logging(): function demo_color_codes (line 25) | def demo_color_codes(): function demo_timestamp (line 52) | def demo_timestamp(): function demo_real_world_usage (line 65) | def demo_real_world_usage(): function demo_progress_tracking (line 99) | def demo_progress_tracking(): function demo_error_scenarios (line 123) | def demo_error_scenarios(): function demo_formatting_combinations (line 146) | def demo_formatting_combinations(): function demo_log_levels (line 177) | def demo_log_levels(): function main (line 206) | def main(): FILE: dev/math-vista/math-vista.py class DecodedImage (line 14) | class DecodedImage(TypedDict): class Scenario (line 18) | class Scenario(TypedDict): function main (line 26) | async def main(model_name: str, steps: int) -> None: function parse_args (line 116) | def parse_args() -> argparse.Namespace: FILE: dev/new_models/benchmark_inference.py function timed_request (line 21) | async def timed_request(client, model_name, prompt, max_tokens, temperat... function main (line 46) | async def main(): FILE: dev/new_models/gemma3.py function rollout (line 12) | async def rollout(model: art.TrainableModel, prompt: str) -> art.Traject... function main (line 40) | async def main(): FILE: dev/new_models/qwen3_try.py function rollout (line 12) | async def rollout(model: art.TrainableModel, prompt: str) -> art.Traject... function main (line 41) | async def main(): FILE: dev/sft/distillation.py function main (line 23) | async def main(): FILE: dev/sft/sft-from-file.py function main (line 11) | async def main(): FILE: dev/sft/sft-warmup.py function rl_rollout (line 24) | async def rl_rollout(model: art.TrainableModel, prompt: str) -> art.Traj... function main (line 43) | async def main(): FILE: dev/yes-no-maybe-kl-advantage.py function rollout (line 21) | async def rollout( function with_quotes (line 47) | def with_quotes(w: str) -> str: function main (line 51) | async def main(): FILE: dev/yes-no-maybe-megatron.py function rollout (line 13) | async def rollout( function with_quotes (line 34) | def with_quotes(w: str) -> str: function main (line 38) | async def main(): FILE: dev/yes-no-maybe-metrics.py function create_chat_completion (line 28) | async def create_chat_completion( function with_quotes (line 44) | def with_quotes(word: str) -> str: function build_prompts (line 48) | def build_prompts() -> list[str]: function reward_for_answer (line 61) | def reward_for_answer(content: str | None) -> float: function scenario_id_for_prompt (line 71) | def scenario_id_for_prompt(prompt: str) -> str: function response_total_tokens (line 75) | def response_total_tokens( function total_actor_tokens (line 86) | def total_actor_tokens(groups: list[art.TrajectoryGroup]) -> int: function rollout (line 94) | async def rollout( function evaluate (line 125) | async def evaluate( function print_history_summary (line 151) | def print_history_summary(model: art.TrainableModel) -> None: function build_internal_config (line 158) | def build_internal_config() -> art.dev.InternalModelConfig: function main (line 169) | async def main() -> None: FILE: dev/yes-no-maybe-vision/generate_images.py function _load_font (line 14) | def _load_font(font_path: str | Path | None, preferred_size: int) -> Any: function generate_yes_no_maybe_prompts (line 36) | def generate_yes_no_maybe_prompts() -> list[str]: function _wrap_text_to_width (line 54) | def _wrap_text_to_width( function _max_fit_font_size (line 80) | def _max_fit_font_size( function save_prompt_images (line 132) | def save_prompt_images( function _slugify (line 229) | def _slugify(text: str, max_length: int = 80) -> str: FILE: dev/yes-no-maybe.py function rollout (line 12) | async def rollout(client: openai.AsyncOpenAI, prompt: str) -> art.Trajec... function with_quotes (line 36) | def with_quotes(w: str) -> str: function main (line 40) | async def main(): FILE: examples/2048/generate_benchmarks.py function log_comparison_model (line 42) | async def log_comparison_model(comparison_model: art.Model): function run_benchmarks (line 63) | async def run_benchmarks(): FILE: examples/2048/rollout.py function rollout (line 26) | async def rollout( function main (line 128) | async def main(): FILE: examples/2048/train.py function train (line 32) | async def train(): FILE: examples/2048/utils.py class TwentyFortyEightGame (line 15) | class TwentyFortyEightGame(TypedDict): class Direction (line 20) | class Direction(str, Enum): function populate_random_cell (line 28) | def populate_random_cell(game: TwentyFortyEightGame) -> None: function generate_game (line 43) | def generate_game(board_length: int = 4) -> TwentyFortyEightGame: function render_board (line 59) | def render_board(game: TwentyFortyEightGame) -> str: function condense_sequence (line 89) | def condense_sequence(sequence: list[int | None]) -> list[int | None]: function condense_board (line 111) | def condense_board(game: TwentyFortyEightGame, direction: Direction) -> ... function apply_agent_move (line 144) | def apply_agent_move(game: TwentyFortyEightGame, move_xml: str) -> None: function max_cell_value (line 162) | def max_cell_value(game: TwentyFortyEightGame) -> int: function check_game_finished (line 167) | def check_game_finished(game: TwentyFortyEightGame) -> bool: function total_board_value (line 179) | def total_board_value(game: TwentyFortyEightGame) -> int: FILE: examples/benchmarking_comparison_models.py class MyTask (line 15) | class MyTask(BaseModel): class MyConfig (line 40) | class MyConfig(BaseModel): function reward (line 49) | def reward(config: MyConfig, scenario: MyTask, response: str): function benchmark_model (line 64) | async def benchmark_model(model: art.Model): function rollout (line 84) | async def rollout(model: art.Model[MyConfig], scenario: MyTask) -> art.T... function train_model (line 116) | async def train_model(model: art.TrainableModel): function main (line 143) | async def main(): FILE: examples/hn_title_generator/reference_grpo_trainer.py function filter_on_length (line 57) | def filter_on_length( function load_title_data (line 81) | async def load_title_data( function score_title_async (line 107) | async def score_title_async(row_data: dict) -> float: function calculate_rewards (line 136) | async def calculate_rewards( function reward_func (line 210) | def reward_func( class ValidationCallback (line 231) | class ValidationCallback(TrainerCallback): method __init__ (line 232) | def __init__( method on_step_end (line 253) | def on_step_end( FILE: examples/hn_title_generator/train.py function filter_on_length (line 35) | def filter_on_length(data: Dataset, max_length: int, tokenizer_name: str... function load_data (line 76) | async def load_data( function call_score_title (line 115) | async def call_score_title(row_with_title: Dict[str, Any]) -> float: function check_title_matches_body (line 120) | async def check_title_matches_body( function rollout (line 159) | async def rollout( function main (line 235) | async def main(): FILE: examples/hn_title_generator/utils.py class ScoreRequest (line 19) | class ScoreRequest(BaseModel): method serialize_time (line 27) | def serialize_time(self, value: datetime) -> str: function serialize_story (line 33) | def serialize_story(story): function with_serialized_stories (line 39) | def with_serialized_stories(df: pl.DataFrame) -> pl.DataFrame: function calculate_metrics_by_split (line 47) | def calculate_metrics_by_split(df: pl.DataFrame) -> pl.DataFrame: function score_title (line 95) | async def score_title( function pull_data (line 131) | def pull_data( function prompt_for_title (line 146) | def prompt_for_title(content: str) -> list[dict]: FILE: examples/just-the-facts/just_the_facts/checks.py function check_includes_all_facts (line 20) | async def check_includes_all_facts(original_text: str, summary_text: str... function check_hallucinated_facts (line 65) | async def check_hallucinated_facts(original_text: str, summary_text: str... function check_has_conservative_bias (line 110) | async def check_has_conservative_bias(original_text: str, summary_text: ... function check_has_liberal_bias (line 151) | async def check_has_liberal_bias(original_text: str, summary_text: str) ... FILE: examples/just-the-facts/just_the_facts/experiments.py class JustTheFactsConfig (line 6) | class JustTheFactsConfig(BaseModel): FILE: examples/just-the-facts/just_the_facts/generate_benchmarks.py function log_comparison_model (line 59) | async def log_comparison_model(comparison_model: art.Model): function run_benchmarks (line 78) | async def run_benchmarks(): FILE: examples/just-the-facts/just_the_facts/rollout.py class FactsScenario (line 21) | class FactsScenario(BaseModel): function rollout (line 26) | async def rollout(model: art.Model, scenario: FactsScenario) -> art.Traj... FILE: examples/just-the-facts/just_the_facts/train.py function train (line 20) | async def train(model: art.TrainableModel[JustTheFactsConfig]): FILE: examples/just-the-facts/just_the_facts/utils.py function scrape_article (line 9) | async def scrape_article(url: str) -> str: function _fallback_scrape (line 57) | async def _fallback_scrape(url: str) -> str: FILE: examples/just-the-facts/main.py function main (line 1) | def main(): FILE: examples/just-the-facts/test_scraper.py function test_scraper (line 9) | async def test_scraper(): FILE: examples/mcp-rl/all_experiments.py class McpPolicyConfig (line 6) | class McpPolicyConfig(BaseModel): FILE: examples/mcp-rl/mcp_rl/benchmarks/generate_benchmarks.py function generate_val_groups (line 31) | async def generate_val_groups( function calculate_beat_comp (line 46) | async def calculate_beat_comp( function log_comparison_model (line 102) | async def log_comparison_model( function run_benchmarks (line 124) | async def run_benchmarks(server: str = "mcp_alphavantage"): FILE: examples/mcp-rl/mcp_rl/checks.py function check_successful (line 24) | async def check_successful(trajectory: art.Trajectory) -> bool: FILE: examples/mcp-rl/mcp_rl/mcp_server.py class McpServer (line 13) | class McpServer(ABC): method __init__ (line 16) | def __init__(self): method start (line 21) | async def start(self) -> None: method stop (line 26) | async def stop(self) -> None: method get_tools (line 31) | async def get_tools(self) -> List[Dict[str, Any]]: method apply_tool (line 40) | async def apply_tool(self, tool_name: str, arguments: Dict[str, Any]) ... method __aenter__ (line 52) | async def __aenter__(self): method __aexit__ (line 57) | async def __aexit__(self, exc_type, exc_val, exc_tb): class LocalMcpServer (line 62) | class LocalMcpServer(McpServer): method __init__ (line 65) | def __init__(self): method init_server (line 75) | async def init_server(self) -> StdioServerParameters: method start (line 83) | async def start(self) -> None: method stop (line 98) | async def stop(self) -> None: method get_tools (line 111) | async def get_tools(self) -> List[Dict[str, Any]]: method apply_tool (line 139) | async def apply_tool(self, tool_name: str, arguments: Dict[str, Any]) ... class RemoteMcpServer (line 178) | class RemoteMcpServer(McpServer): method __init__ (line 181) | def __init__(self, api_endpoint: str): method start (line 191) | async def start(self) -> None: method stop (line 200) | async def stop(self) -> None: method get_tools (line 206) | async def get_tools(self) -> List[Dict[str, Any]]: method apply_tool (line 243) | async def apply_tool(self, tool_name: str, arguments: Dict[str, Any]) ... class AlphaMcpServer (line 298) | class AlphaMcpServer(LocalMcpServer): method __init__ (line 301) | def __init__(self, api_key: str = "demo"): method init_server (line 310) | async def init_server(self) -> StdioServerParameters: FILE: examples/mcp-rl/mcp_rl/rollout.py class McpScenario (line 34) | class McpScenario: function rollout (line 43) | async def rollout( function test_rollout (line 254) | async def test_rollout(): function main (line 272) | async def main(): FILE: examples/mcp-rl/mcp_rl/scenario_generator.py function generate_scenarios (line 19) | async def generate_scenarios( function main (line 195) | async def main(): FILE: examples/mcp-rl/mcp_rl/train.py function train_mcp_agent (line 33) | async def train_mcp_agent(model: art.TrainableModel): function main (line 172) | def main(): FILE: examples/mcp-rl/mcp_rl/utils.py function get_content_text (line 4) | def get_content_text(result: types.CallToolResult) -> str: FILE: examples/mcp-rl/servers/python/mcp_alphavantage/server.py class AlphaVantageClient (line 16) | class AlphaVantageClient: method __init__ (line 19) | def __init__(self, api_key: str): method fetch_data (line 23) | async def fetch_data(self, function: str, **params) -> Dict[str, Any]: function main (line 62) | def main(api_key: Optional[str], port: int, transport: str) -> int: function _format_json (line 359) | def _format_json(data: Dict[str, Any]) -> str: FILE: examples/mcp-rl/servers/python/mcp_balldontlie/server.py class BalldontlieClient (line 16) | class BalldontlieClient: method __init__ (line 19) | def __init__(self, api_key: str): method fetch_data (line 23) | async def fetch_data(self, endpoint: str, **params) -> Dict[str, Any]: function main (line 51) | def main(api_key: Optional[str], port: int, transport: str) -> int: function _format_json (line 318) | def _format_json(data: Dict[str, Any]) -> str: FILE: examples/mcp-rl/servers/python/mcp_googlemaps/server.py class GoogleMapsClient (line 16) | class GoogleMapsClient: method __init__ (line 19) | def __init__(self, api_key: str): method geocode (line 24) | async def geocode(self, address: str, **params) -> Dict[str, Any]: method reverse_geocode (line 48) | async def reverse_geocode(self, lat: float, lng: float, **params) -> D... method places_nearby_search (line 72) | async def places_nearby_search( method places_text_search (line 101) | async def places_text_search(self, query: str, **params) -> Dict[str, ... method place_details (line 124) | async def place_details(self, place_id: str, **params) -> Dict[str, Any]: method place_autocomplete (line 147) | async def place_autocomplete(self, input_text: str, **params) -> Dict[... function main (line 180) | def main(api_key: Optional[str], port: int, transport: str) -> int: function _format_json (line 486) | def _format_json(data: Dict[str, Any]) -> str: FILE: examples/mcp-rl/test_scenario_generation.py function create_sample_tools (line 15) | def create_sample_tools() -> List[MCPTool]: function create_sample_resources (line 85) | def create_sample_resources() -> List[MCPResource]: function test_basic_scenario_generation (line 109) | async def test_basic_scenario_generation(): function test_scenario_generation_with_resources (line 150) | async def test_scenario_generation_with_resources(): function test_dict_input_compatibility (line 182) | async def test_dict_input_compatibility(): function test_error_handling (line 239) | async def test_error_handling(): function test_tool_resource_classes (line 275) | def test_tool_resource_classes(): function main (line 318) | async def main(): FILE: examples/openenv_echo.py function rollout (line 25) | async def rollout(model: art.TrainableModel, env_client: EchoEnv) -> art... function main (line 58) | async def main() -> None: FILE: examples/temporal_clue/temporal-clue.py class TemporalCluePuzzle (line 16) | class TemporalCluePuzzle(TypedDict): function rollout (line 35) | async def rollout(model: art.Model, puzzle: TemporalCluePuzzle) -> art.T... function main (line 56) | async def main(): FILE: examples/tic_tac_toe/game_utils.py class TicTacToeGame (line 6) | class TicTacToeGame(TypedDict): function generate_game (line 12) | def generate_game(board_length: int = 3) -> TicTacToeGame: function render_board (line 23) | def render_board(game: TicTacToeGame) -> str: function get_opponent_move (line 39) | def get_opponent_move(game: TicTacToeGame) -> tuple[int, int]: function apply_agent_move (line 47) | def apply_agent_move(game: TicTacToeGame, move: str) -> None: function check_winner (line 80) | def check_winner(board: list[list[str]]) -> Literal["x", "o", "draw", No... FILE: examples/tic_tac_toe/rollout.py class TicTacToeScenario (line 22) | class TicTacToeScenario(BaseModel): function rollout (line 28) | async def rollout(model: art.Model, scenario: TicTacToeScenario) -> art.... FILE: examples/tic_tac_toe/tic-tac-toe.py function main (line 25) | async def main(): FILE: examples/tic_tac_toe_self_play/deploy_step.py function deploy_step (line 12) | async def deploy_step(): FILE: examples/tic_tac_toe_self_play/game_utils.py class TicTacToeGame (line 5) | class TicTacToeGame(TypedDict): function generate_game (line 9) | def generate_game(board_length: int = 3) -> TicTacToeGame: function render_board (line 29) | def render_board(game: TicTacToeGame) -> str: function unwrap_move (line 45) | def unwrap_move(move: str) -> str: function apply_agent_move (line 53) | def apply_agent_move( function check_winner (line 82) | def check_winner(board: list[list[str]]) -> Literal["x", "o", "draw", No... FILE: examples/tic_tac_toe_self_play/gather_trajectory_groups_by_index.py function gather_trajectory_groups_by_index (line 10) | async def gather_trajectory_groups_by_index( FILE: examples/tic_tac_toe_self_play/rollout.py class PlayerState (line 25) | class PlayerState(BaseModel): class ModelConfig (line 31) | class ModelConfig(BaseModel): function get_agent_move (line 35) | async def get_agent_move( function record_first_move_metrics (line 95) | def record_first_move_metrics(trajectory: art.Trajectory, square: str) -... class TicTacToeScenario (line 102) | class TicTacToeScenario(BaseModel): function rollout (line 112) | async def rollout( FILE: examples/tic_tac_toe_self_play/train.py function main (line 27) | async def main(): FILE: examples/tic_tac_toe_self_play/train_o4_mini.py function main (line 24) | async def main(): FILE: scripts/bump_version.py function get_current_version (line 17) | def get_current_version(): function bump_version (line 27) | def bump_version(current_version, bump_type): function update_version (line 41) | def update_version(new_version): function main (line 57) | def main(): FILE: scripts/ci/compute_uv_fingerprint.py function _sha256_file (line 13) | def _sha256_file(path: Path) -> str: function _build_parser (line 17) | def _build_parser() -> argparse.ArgumentParser: function main (line 54) | def main() -> int: FILE: scripts/deploy-model.py function parse_args (line 20) | def parse_args() -> argparse.Namespace: function deploy (line 50) | async def deploy() -> None: FILE: scripts/migrate-s3-checkpoints.py function main (line 25) | async def main(): FILE: src/art/__init__.py class GuidedDecodingParams (line 18) | class GuidedDecodingParams: method __init__ (line 21) | def __init__(self, **kwargs): FILE: src/art/api_costs.py class TokenPricing (line 22) | class TokenPricing: class _OpenAITokenUsage (line 31) | class _OpenAITokenUsage: class _AnthropicTokenUsage (line 38) | class _AnthropicTokenUsage: function _configured_token_pricing (line 60) | def _configured_token_pricing(model_name: str) -> TokenPricing | None: function normalize_provider (line 74) | def normalize_provider(provider: str | None) -> str | None: function _read_usage_field (line 83) | def _read_usage_field(usage: Any, field: str) -> float | None: function _read_usage_nested_field (line 95) | def _read_usage_nested_field(usage: Any, *fields: str) -> float | None: function _read_field (line 109) | def _read_field(container: Any, field: str) -> Any: function _coerce_float (line 117) | def _coerce_float(value: Any) -> float | None: function _extract_cost_value (line 126) | def _extract_cost_value(value: Any) -> float | None: function _response_usage (line 133) | def _response_usage(response: Any) -> Any: function _extract_direct_response_cost (line 139) | def _extract_direct_response_cost(response: Any) -> float | None: function _extract_openai_token_counts (line 157) | def _extract_openai_token_counts(response: Any) -> _OpenAITokenUsage | N... function _extract_anthropic_token_counts (line 178) | def _extract_anthropic_token_counts(response: Any) -> _AnthropicTokenUsa... function _estimate_openai_cost (line 201) | def _estimate_openai_cost( function _estimate_anthropic_cost (line 229) | def _estimate_anthropic_cost( function _estimate_provider_cost (line 262) | def _estimate_provider_cost( function _resolve_registered_or_default_pricing (line 277) | def _resolve_registered_or_default_pricing( function _merge_token_pricing (line 288) | def _merge_token_pricing( function normalize_model_name (line 326) | def normalize_model_name(model_name: str | None) -> str | None: function _resolve_token_pricing (line 335) | def _resolve_token_pricing( function extract_api_cost (line 400) | def extract_api_cost( function _record_api_cost (line 449) | def _record_api_cost( function track_api_cost (line 483) | def track_api_cost( FILE: src/art/auto_trajectory.py function parse_sse_to_chat_completion (line 16) | def parse_sse_to_chat_completion(content: bytes) -> ChatCompletion: function auto_trajectory (line 46) | def auto_trajectory(*, required: Literal[True]) -> Trajectory: ... function auto_trajectory (line 50) | def auto_trajectory(*, required: Literal[False] = False) -> Trajectory |... function auto_trajectory (line 53) | def auto_trajectory(*, required: bool = False) -> Trajectory | None: function capture_auto_trajectory (line 64) | async def capture_auto_trajectory(coroutine: Coroutine[Any, Any, Any]) -... class AutoTrajectoryContext (line 70) | class AutoTrajectoryContext: method __init__ (line 71) | def __init__(self) -> None: method __enter__ (line 74) | def __enter__(self) -> Trajectory: method __exit__ (line 78) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> N... method handle_httpx_response (line 82) | def handle_httpx_response(self, response: httpx._models.Response) -> N... function patch_httpx (line 143) | def patch_httpx() -> None: FILE: src/art/backend.py class Backend (line 15) | class Backend(Protocol): method _model_inference_name (line 18) | def _model_inference_name( method close (line 22) | async def close(self) -> None: ... method register (line 24) | async def register(self, model: AnyModel) -> None: ... method _get_step (line 26) | async def _get_step(self, model: AnyTrainableModel) -> int: ... method _delete_checkpoint_files (line 28) | async def _delete_checkpoint_files( method _prepare_backend_for_training (line 32) | async def _prepare_backend_for_training( method train (line 38) | async def train( method _train_model (line 45) | def _train_model( method _train_sft (line 54) | def _train_sft( FILE: src/art/batches.py function trajectory_group_batches (line 10) | async def trajectory_group_batches( FILE: src/art/cli.py function _get_skill_path (line 20) | def _get_skill_path(skill_name: str) -> Path: function _chat_with_skill (line 39) | def _chat_with_skill(skill_name: str) -> None: function train_sft (line 122) | def train_sft() -> None: function train_rl (line 128) | def train_rl() -> None: function install_skills (line 134) | def install_skills( function migrate (line 177) | def migrate( function run (line 286) | def run(host: str = "0.0.0.0", port: int = 7999) -> None: FILE: src/art/costs.py class ModelPricing (line 10) | class ModelPricing: function get_model_pricing (line 71) | def get_model_pricing( function tokens_to_cost (line 87) | def tokens_to_cost(num_tokens: float, price_per_million: float) -> float: function compute_sample_costs (line 92) | def compute_sample_costs( function build_cost_calculator (line 113) | def build_cost_calculator(pricing: ModelPricing) -> CostCalculator: function compute_train_cost (line 131) | def compute_train_cost(train_tokens: float, pricing: ModelPricing) -> fl... FILE: src/art/dev/engine.py class EngineArgs (line 6) | class EngineArgs(TypedDict, total=False): FILE: src/art/dev/get_model_config.py function get_model_config (line 6) | def get_model_config( FILE: src/art/dev/model.py class OptimizerNames (line 9) | class OptimizerNames(str, Enum): class DebugOption (line 58) | class DebugOption(str, Enum): class IntervalStrategy (line 64) | class IntervalStrategy(str, Enum): class HubStrategy (line 75) | class HubStrategy(str, Enum): class SchedulerType (line 83) | class SchedulerType(str, Enum): class FSDPOption (line 98) | class FSDPOption(str, Enum): class InternalModelConfig (line 108) | class InternalModelConfig(TypedDict, total=False): class TinkerArgs (line 135) | class TinkerArgs(TypedDict, total=False): class TinkerNativeArgs (line 140) | class TinkerNativeArgs(TypedDict, total=False): class TinkerTrainingClientArgs (line 145) | class TinkerTrainingClientArgs(TypedDict, total=False): class InitArgs (line 154) | class InitArgs(TypedDict, total=False): class PeftArgs (line 180) | class PeftArgs(TypedDict, total=False): class TrainerArgs (line 198) | class TrainerArgs(TypedDict, total=False): FILE: src/art/dev/openai_server.py function get_openai_server_config (line 8) | def get_openai_server_config( class OpenAIServerConfig (line 50) | class OpenAIServerConfig(TypedDict, total=False): class ServerArgs (line 68) | class ServerArgs(TypedDict, total=False): FILE: src/art/dev/train.py class TrainConfig (line 6) | class TrainConfig(TypedDict, total=False): class TrainSFTConfig (line 34) | class TrainSFTConfig(TypedDict, total=False): FILE: src/art/dev/validate.py function is_dedicated_mode (line 6) | def is_dedicated_mode(config: InternalModelConfig) -> bool: function validate_dedicated_config (line 11) | def validate_dedicated_config(config: InternalModelConfig) -> None: FILE: src/art/errors.py class ARTError (line 8) | class ARTError(Exception): method __init__ (line 11) | def __init__(self, message: str, status_code: int): class ForbiddenBucketCreationError (line 17) | class ForbiddenBucketCreationError(ARTError): method __init__ (line 26) | def __init__(self, message: str): class UnsupportedLoRADeploymentProviderError (line 30) | class UnsupportedLoRADeploymentProviderError(ARTError): method __init__ (line 37) | def __init__(self, message: str): class UnsupportedBaseModelDeploymentError (line 41) | class UnsupportedBaseModelDeploymentError(ARTError): method __init__ (line 48) | def __init__(self, message: str): class LoRADeploymentTimedOutError (line 52) | class LoRADeploymentTimedOutError(ARTError): method __init__ (line 58) | def __init__(self, message: str): FILE: src/art/gather.py function gather_trajectory_groups (line 14) | async def gather_trajectory_groups( function gather_trajectories (line 69) | async def gather_trajectories( function gather_trajectories (line 79) | async def gather_trajectories( function gather_trajectories (line 89) | async def gather_trajectories( function gather_trajectories (line 99) | async def gather_trajectories( function gather_trajectories (line 108) | async def gather_trajectories( function wrap_group_awaitable (line 140) | async def wrap_group_awaitable( function wrap_trajectories_awaitable (line 159) | async def wrap_trajectories_awaitable( function record_metrics (line 183) | def record_metrics(context: "GatherContext", trajectory: Trajectory) -> ... class GatherContext (line 203) | class GatherContext: method update_pbar (line 211) | def update_pbar(self, n: int) -> None: method too_many_exceptions (line 228) | def too_many_exceptions(self) -> bool: method reset (line 237) | def reset(self) -> None: function set_gather_context (line 248) | def set_gather_context(context: GatherContext) -> Iterator[None]: function get_gather_context (line 256) | def get_gather_context() -> GatherContext: FILE: src/art/guided_completion.py function freeze_tool_schema (line 16) | def freeze_tool_schema(tool: dict, fixed_args: dict) -> ChatCompletionTo... function get_guided_completion_params (line 33) | def get_guided_completion_params( FILE: src/art/langgraph/llm_wrapper.py function add_thread (line 26) | def add_thread(thread_id, base_url, api_key, model): function create_messages_from_logs (line 40) | def create_messages_from_logs(log_path: str, trajectory: Trajectory): function wrap_rollout (line 95) | def wrap_rollout(model, fn): function init_chat_model (line 110) | def init_chat_model( class LoggingLLM (line 130) | class LoggingLLM(Runnable): method __init__ (line 131) | def __init__(self, llm, logger, structured_output=None, tools=None): method _log (line 137) | def _log(self, completion_id, input, output): method invoke (line 142) | def invoke(self, input, config=None, **kwargs): method ainvoke (line 164) | async def ainvoke(self, input, config=None, **kwargs): method with_structured_output (line 191) | def with_structured_output(self, tools): method bind_tools (line 199) | def bind_tools(self, tools): method with_retry (line 202) | def with_retry( method with_config (line 212) | def with_config( FILE: src/art/langgraph/logging.py class FileLogger (line 5) | class FileLogger: method __init__ (line 6) | def __init__(self, filepath): method log (line 10) | def log(self, name, entry): method load_logs (line 19) | def load_logs(self): FILE: src/art/langgraph/message_utils.py function make_message_param (line 47) | def make_message_param(role: str, **kwargs) -> ChatCompletionMessageParam: function langchain_msg_to_openai (line 54) | def langchain_msg_to_openai(msg: BaseMessage): function convert_langgraph_messages (line 90) | def convert_langgraph_messages(messages: List[object]) -> MessagesAndCho... FILE: src/art/local/backend.py class LocalBackend (line 74) | class LocalBackend(Backend): method __init__ (line 75) | def __init__( method supports_automatic_train_step_metrics (line 109) | def supports_automatic_train_step_metrics(self) -> bool: method automatic_gpu_cost_per_hour_usd (line 112) | def automatic_gpu_cost_per_hour_usd(self, model: Model) -> float | None: method _resolve_gpu_cost_per_hour_usd (line 122) | def _resolve_gpu_cost_per_hour_usd(self) -> float | None: method _allocated_gpu_count (line 148) | def _allocated_gpu_count(self, model: Model) -> int: method __enter__ (line 160) | def __enter__(self) -> Self: method __aenter__ (line 163) | async def __aenter__(self) -> Self: method __exit__ (line 166) | def __exit__( method __aexit__ (line 174) | async def __aexit__( method close (line 182) | async def close(self) -> None: method _close (line 196) | def _close(self) -> None: method register (line 203) | async def register( method _model_inference_name (line 235) | def _model_inference_name(self, model: Model, step: int | None = None)... method _get_service (line 271) | async def _get_service(self, model: TrainableModel) -> ModelService: method _get_packed_tensors (line 317) | def _get_packed_tensors( method _get_step (line 383) | async def _get_step(self, model: AnyTrainableModel) -> int: method __get_step (line 386) | def __get_step(self, model: Model) -> int: method _delete_checkpoint_files (line 393) | async def _delete_checkpoint_files( method _prepare_backend_for_training (line 412) | async def _prepare_backend_for_training( method _monitor_openai_server (line 443) | async def _monitor_openai_server( method _trajectory_log (line 513) | def _trajectory_log(self, trajectory: Trajectory) -> str: method train (line 525) | async def train( # type: ignore[override] method _train_model (line 731) | async def _train_model( method _train_sft (line 851) | async def _train_sft( method _experimental_pull_model_checkpoint (line 957) | async def _experimental_pull_model_checkpoint( method _experimental_pull_from_s3 (line 1097) | async def _experimental_pull_from_s3( method _experimental_push_to_s3 (line 1178) | async def _experimental_push_to_s3( method _experimental_fork_checkpoint (line 1198) | async def _experimental_fork_checkpoint( FILE: src/art/local/checkpoints.py function delete_checkpoints (line 7) | def delete_checkpoints(output_dir: str, excluding: list[int]) -> None: function get_last_checkpoint_dir (line 23) | def get_last_checkpoint_dir(output_dir: str) -> str | None: function migrate_checkpoints_to_new_structure (line 33) | def migrate_checkpoints_to_new_structure(output_dir: str) -> None: FILE: src/art/local/service.py class ModelService (line 9) | class ModelService(Protocol): method __init__ (line 10) | def __init__( method start_openai_server (line 19) | async def start_openai_server( method vllm_engine_is_sleeping (line 23) | async def vllm_engine_is_sleeping(self) -> bool: ... method train (line 25) | def train( method train_sft (line 33) | def train_sft( FILE: src/art/loss.py class Loss (line 14) | class Loss(BaseModel): function loss_fn (line 23) | def loss_fn( function shift_tensor (line 145) | def shift_tensor(tensor: torch.Tensor, pad: int | float | bool) -> torch... FILE: src/art/mcp/generate_scenarios.py function preview_scenarios (line 13) | def preview_scenarios(scenarios: List[Dict[str, Any]], n: int = 5): function generate_scenarios (line 27) | async def generate_scenarios( FILE: src/art/mcp/types.py class MCPTool (line 11) | class MCPTool: method from_dict (line 19) | def from_dict(cls, data: Dict[str, Any]) -> "MCPTool": method to_dict (line 27) | def to_dict(self) -> Dict[str, Any]: method to_tool_schema (line 35) | def to_tool_schema(self) -> Dict[str, Any]: class MCPResource (line 44) | class MCPResource: method from_dict (line 53) | def from_dict(cls, data: Dict[str, Any]) -> "MCPResource": method to_dict (line 62) | def to_dict(self) -> Dict[str, Any]: class GeneratedScenario (line 71) | class GeneratedScenario: method __post_init__ (line 77) | def __post_init__(self): method from_dict (line 82) | def from_dict(cls, data: Dict[str, Any]) -> "GeneratedScenario": method to_dict (line 86) | def to_dict(self) -> Dict[str, Any]: method preview (line 90) | def preview(self, max_length: int = 120) -> str: class GeneratedScenarioCollection (line 97) | class GeneratedScenarioCollection: method __init__ (line 100) | def __init__(self, scenarios: List[GeneratedScenario]): method from_dicts (line 104) | def from_dicts(cls, data: List[Dict[str, Any]]) -> "GeneratedScenarioC... method from_json (line 110) | def from_json(cls, json_str: str) -> "GeneratedScenarioCollection": method to_dicts (line 119) | def to_dicts(self) -> List[Dict[str, Any]]: method to_json (line 123) | def to_json(self, indent: Optional[int] = None) -> str: method __len__ (line 127) | def __len__(self) -> int: method __iter__ (line 130) | def __iter__(self): method __getitem__ (line 133) | def __getitem__(self, index): method shuffle (line 136) | def shuffle(self) -> "GeneratedScenarioCollection": method split (line 142) | def split( method filter_by_difficulty (line 158) | def filter_by_difficulty( method get_difficulty_distribution (line 169) | def get_difficulty_distribution(self) -> Counter: method preview (line 173) | def preview(self, n: int = 5, max_task_length: int = 120) -> None: method print_difficulty_distribution (line 184) | def print_difficulty_distribution(self) -> None: method get_summary (line 193) | def get_summary(self) -> Dict[str, Any]: FILE: src/art/megatron/backend.py class MegatronBackend (line 9) | class MegatronBackend(LocalBackend): method __init__ (line 10) | def __init__( method _get_service (line 18) | async def _get_service(self, model: TrainableModel) -> ModelService: FILE: src/art/megatron/flex_attention.py class SharedPrefixAttentionState (line 21) | class SharedPrefixAttentionState(BaseModel): class FlexAttentionWrapper (line 28) | class FlexAttentionWrapper(torch.nn.Module): method forward (line 42) | def forward( function create_shared_prefix_attention_state (line 69) | def create_shared_prefix_attention_state( class FlexDotProductAttention (line 107) | class FlexDotProductAttention(torch.nn.Module): method __init__ (line 113) | def __init__( method forward (line 158) | def forward( FILE: src/art/megatron/lora.py class LoRA (line 19) | class LoRA(torch.nn.Module): method __init__ (line 20) | def __init__( method num_local_experts (line 51) | def num_local_experts(self) -> int: method reset_lora_parameters (line 54) | def reset_lora_parameters(self) -> None: method load_lora (line 63) | def load_lora(self, adapter_model: dict[str, torch.Tensor]) -> None: method load_weights (line 79) | def load_weights( method load_weight (line 102) | def load_weight(self, weight: torch.Tensor, *, into: torch.nn.Paramete... method sharded_lora_state_dict (line 119) | def sharded_lora_state_dict(self) -> dict[str, torch.Tensor]: method forward (line 145) | def forward( class SelfAttentionLinearProjLoRA (line 165) | class SelfAttentionLinearProjLoRA(torch.nn.Module): method __init__ (line 166) | def __init__( method forward (line 188) | def forward(self, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor... class SelfAttentionLinearQKVLoRA (line 205) | class SelfAttentionLinearQKVLoRA(torch.nn.Module): method __init__ (line 206) | def __init__( method forward (line 262) | def forward(self, x: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor... class MLPExpertsLinearFC1LoRA (line 293) | class MLPExpertsLinearFC1LoRA(torch.nn.Module): method __init__ (line 294) | def __init__( method forward (line 327) | def forward( class MLPExpertsLinearFC2LoRA (line 337) | class MLPExpertsLinearFC2LoRA(torch.nn.Module): method __init__ (line 338) | def __init__( method forward (line 361) | def forward( function apply_lora_adapters (line 369) | def apply_lora_adapters( FILE: src/art/megatron/offload.py class OffloadState (line 9) | class OffloadState: function offload_to_cpu (line 14) | def offload_to_cpu( function reload_to_gpu (line 88) | def reload_to_gpu( FILE: src/art/megatron/provider.py function _resolve_layer_spec (line 16) | def _resolve_layer_spec( function get_provider (line 31) | def get_provider(model: str) -> GPTModelProvider: FILE: src/art/megatron/service.py class MegatronTrainingJob (line 31) | class MegatronTrainingJob(BaseModel): class MegatronService (line 42) | class MegatronService: method _next_lora_id (line 53) | def _next_lora_id(self) -> int: method _get_optimizer_state_path (line 57) | def _get_optimizer_state_path(self) -> str: method _default_lora_adapter_config (line 64) | def _default_lora_adapter_config(self) -> LoraConfig: method _adapter_has_weights (line 81) | def _adapter_has_weights(self, lora_path: str) -> bool: method _create_identity_lora (line 95) | def _create_identity_lora(self, lora_path: str) -> None: method _ensure_identity_lora (line 119) | def _ensure_identity_lora(self, lora_path: str) -> None: method _ensure_lora_adapter_config (line 124) | def _ensure_lora_adapter_config( method _add_lora_aliases (line 139) | async def _add_lora_aliases( method register_lora_for_step (line 153) | async def register_lora_for_step(self, step: int, checkpoint_dir: str)... method _ensure_megatron_running (line 159) | async def _ensure_megatron_running(self) -> None: method start_openai_server (line 184) | async def start_openai_server( method vllm_engine_is_sleeping (line 212) | async def vllm_engine_is_sleeping(self) -> bool: method train (line 215) | async def train( method train_sft (line 299) | async def train_sft( method _merge_lora_adapter (line 307) | def _merge_lora_adapter(self, lora_path: str) -> None: method llm (line 336) | def llm(self) -> asyncio.Task[AsyncLLM]: FILE: src/art/megatron/train.py function _set_cache_dir (line 5) | def _set_cache_dir(env_var: str, default_path: str) -> None: function freeze_model (line 52) | def freeze_model(model_chunks: list[MegatronModule]) -> list[MegatronMod... function _preprocess_hook (line 80) | def _preprocess_hook(*args, **kwargs): class TrainingJob (line 125) | class TrainingJob(BaseModel): function print0 (line 133) | def print0(*values: Any) -> None: FILE: src/art/metrics.py function is_cumulative_metric_key (line 27) | def is_cumulative_metric_key(key: str) -> bool: function is_builder_managed_metric (line 32) | def is_builder_managed_metric(key: str) -> bool: function to_cumulative_metric_key (line 36) | def to_cumulative_metric_key(key: str) -> str: class _PendingMetricsState (line 47) | class _PendingMetricsState: class _SharedMetricsState (line 53) | class _SharedMetricsState: function _new_pending_metrics_state (line 62) | def _new_pending_metrics_state() -> _PendingMetricsState: function _new_shared_metrics_state (line 66) | def _new_shared_metrics_state() -> _SharedMetricsState: class MetricsBuilder (line 77) | class MetricsBuilder: method __init__ (line 80) | def __init__( method add_cost (line 98) | def add_cost(self, path: str, usd: float) -> None: method add_response_cost (line 104) | def add_response_cost( method add_metric (line 139) | def add_metric(self, key: str, value: float) -> None: method add_data (line 144) | def add_data( method add_user_timing (line 159) | def add_user_timing( method add_idle_times (line 172) | def add_idle_times( method measure (line 186) | def measure(self, key: str): method flush (line 193) | async def flush(self) -> dict[str, float]: method activate (line 223) | def activate(self) -> Token["MetricsBuilder"]: method activate_context (line 227) | def activate_context(self): method get_active (line 235) | def get_active() -> "MetricsBuilder": method for_cost_context (line 238) | def for_cost_context( method register_cost_extractor (line 262) | def register_cost_extractor(self, provider: str, extractor: CostExtrac... method register_model_pricing (line 268) | def register_model_pricing( method state_dict (line 301) | def state_dict(self) -> dict[str, Any]: method load_state_dict (line 307) | def load_state_dict(self, state: dict[str, Any]) -> None: method _validate_and_add (line 319) | def _validate_and_add(self, key: str, value: float) -> None: method _pending_state (line 340) | def _pending_state(self) -> _PendingMetricsState: method _compute_rollups (line 347) | def _compute_rollups(self, cost_metrics: dict[str, float]) -> dict[str... method _update_throughput_metrics (line 376) | def _update_throughput_metrics(self, result: dict[str, float]) -> None: FILE: src/art/metrics_taxonomy.py function average_metric_samples (line 12) | def average_metric_samples( class TrajectoryBatchSummary (line 46) | class TrajectoryBatchSummary: function summarize_trajectory_groups (line 54) | def summarize_trajectory_groups( function build_data_metrics_from_summary (line 79) | def build_data_metrics_from_summary( function build_training_summary_metrics (line 94) | def build_training_summary_metrics( function _group_is_trainable (line 105) | def _group_is_trainable(group: TrajectoryGroup) -> bool: function _extract_scenario_id (line 110) | def _extract_scenario_id(group: TrajectoryGroup) -> str | None: function _extract_scenario_id_from_metadata (line 121) | def _extract_scenario_id_from_metadata( FILE: src/art/model.py class _OpenAIChatCompletionsProxy (line 41) | class _OpenAIChatCompletionsProxy: method __init__ (line 42) | def __init__(self, completions: Any, record_costs: Any) -> None: method create (line 46) | async def create(self, *args: Any, **kwargs: Any) -> Any: method __getattr__ (line 51) | def __getattr__(self, name: str) -> Any: class _OpenAIChatProxy (line 55) | class _OpenAIChatProxy: method __init__ (line 56) | def __init__(self, chat: Any, record_costs: Any) -> None: method __getattr__ (line 60) | def __getattr__(self, name: str) -> Any: class _OpenAIClientProxy (line 64) | class _OpenAIClientProxy: method __init__ (line 65) | def __init__(self, client: Any, record_costs: Any) -> None: method with_options (line 70) | def with_options(self, *args: Any, **kwargs: Any) -> "_OpenAIClientPro... method __getattr__ (line 76) | def __getattr__(self, name: str) -> Any: class Model (line 95) | class Model( method __init__ (line 167) | def __init__( method __new__ (line 208) | def __new__( method __new__ (line 224) | def __new__( method __new__ (line 239) | def __new__( # pyright: ignore[reportInconsistentOverload] method safe_model_dump (line 246) | def safe_model_dump(self, *args, **kwargs) -> dict: method backend (line 255) | def backend(self) -> "Backend": method register (line 262) | async def register(self, backend: "Backend") -> None: method openai_client (line 274) | def openai_client( method litellm_completion_params (line 314) | def litellm_completion_params(self, step: int | None = None) -> dict: method get_inference_name (line 336) | def get_inference_name(self, step: int | None = None) -> str: method _record_openai_completion_costs (line 361) | def _record_openai_completion_costs(self, _response: Any) -> None: method _get_output_dir (line 365) | def _get_output_dir(self) -> str: method overwrite_state (line 369) | def overwrite_state(self, state: StateType) -> None: method write_state (line 395) | def write_state(self, state: StateType) -> None: method merge_state (line 404) | def merge_state(self, state: StateType) -> StateType: method _deep_merge_dicts (line 419) | def _deep_merge_dicts( method _merge_wandb_config (line 435) | def _merge_wandb_config( method read_state (line 462) | def read_state(self) -> StateType | None: method update_wandb_config (line 481) | def update_wandb_config( method _sync_wandb_config (line 503) | def _sync_wandb_config( method _get_wandb_run (line 518) | def _get_wandb_run(self) -> Optional["Run"]: method _log_metrics (line 569) | def _log_metrics( method _define_wandb_step_metrics (line 623) | def _define_wandb_step_metrics(self, keys: Iterable[str]) -> None: method _route_metrics_and_collect_non_costs (line 636) | def _route_metrics_and_collect_non_costs( method _collect_automatic_backend_metrics (line 658) | def _collect_automatic_backend_metrics( method _add_default_step_metrics (line 698) | def _add_default_step_metrics( method metrics_builder (line 724) | def metrics_builder(self, cost_context: str | None = None) -> MetricsB... method activate_metrics_context (line 730) | def activate_metrics_context(self, cost_context: str) -> Token[Metrics... method _metrics_builder_for_split (line 733) | def _metrics_builder_for_split(self, split: str) -> MetricsBuilder: method _load_metrics_builder_state (line 740) | def _load_metrics_builder_state(self) -> None: method _persist_metrics_builder_state (line 749) | def _persist_metrics_builder_state(self) -> None: method _normalize_trajectory_groups (line 754) | def _normalize_trajectory_groups( method log (line 773) | async def log( method get_step (line 934) | async def get_step(self) -> int: class TrainableModel (line 948) | class TrainableModel(Model[ModelConfig, StateType], Generic[ModelConfig,... method __init__ (line 957) | def __init__( method cost_calculator (line 989) | def cost_calculator(self) -> CostCalculator: method set_cost_calculator (line 992) | def set_cost_calculator(self, calculator: CostCalculator | None) -> None: method _noop_cost_calculator (line 1000) | def _noop_cost_calculator( method _record_openai_completion_costs (line 1007) | def _record_openai_completion_costs(self, _response: Any) -> None: method __new__ (line 1036) | def __new__( method __new__ (line 1051) | def __new__( method __new__ (line 1065) | def __new__( # pyright: ignore[reportInconsistentOverload] method model_dump (line 1072) | def model_dump(self, *args, **kwargs) -> dict: method safe_model_dump (line 1077) | def safe_model_dump(self, *args, **kwargs) -> dict: method register (line 1086) | async def register( method delete_checkpoints (line 1106) | async def delete_checkpoints( method train (line 1139) | async def train( method train_sft (line 1198) | async def train_sft( FILE: src/art/openai.py function consume_chat_completion_stream (line 16) | async def consume_chat_completion_stream( function consume_sync_chat_completion_stream (line 52) | def consume_sync_chat_completion_stream( function init_chat_completion (line 64) | def init_chat_completion(chunk: ChatCompletionChunk) -> ChatCompletion: function update_chat_completion (line 82) | def update_chat_completion( FILE: src/art/pipeline_trainer/binary_prefix_tool_pipeline.py class PipelineConfig (line 28) | class PipelineConfig: function is_valid_guess (line 78) | def is_valid_guess(guess: str) -> bool: function shared_prefix_len (line 82) | def shared_prefix_len(guess: str, secret: str) -> int: function _parse_guess_args (line 91) | def _parse_guess_args(arguments: str | None) -> str | None: function _tool_name_and_args (line 127) | def _tool_name_and_args(tool_call: Any) -> tuple[str | None, str | None]: function extract_guess (line 137) | def extract_guess(choice: Any) -> tuple[str | None, str]: function get_model_output_dir (line 150) | def get_model_output_dir(model: art.TrainableModel) -> Path: function print_history_summary (line 154) | def print_history_summary(model: art.TrainableModel, tail: int = 5) -> N... function main (line 176) | async def main() -> None: FILE: src/art/pipeline_trainer/state.py class PipelineState (line 8) | class PipelineState: FILE: src/art/pipeline_trainer/status.py class StatusReporter (line 14) | class StatusReporter: method __init__ (line 15) | def __init__( method start (line 62) | def start(self, *, initial_step: int | None = None) -> None: method close (line 80) | def close(self) -> None: method flush (line 86) | def flush(self) -> None: method set_step (line 89) | def set_step(self, step: int) -> None: method log_if_due (line 93) | def log_if_due(self, *, force: bool = False) -> None: method note_rollout_started (line 102) | def note_rollout_started(self) -> None: method note_rollout_finished (line 106) | def note_rollout_finished(self, *, errored: bool) -> None: method note_group_enqueued (line 113) | def note_group_enqueued(self, _group: TrajectoryGroup) -> None: method note_group_dequeued (line 117) | def note_group_dequeued(self, _group: TrajectoryGroup) -> None: method note_stale (line 122) | def note_stale(self, count: int) -> None: method note_zero_variance_discarded (line 127) | def note_zero_variance_discarded(self, count: int) -> None: method note_training_start (line 132) | def note_training_start(self, group_count: int) -> None: method note_training_end (line 136) | def note_training_end(self) -> None: method note_training_batch (line 140) | def note_training_batch( method note_val_started (line 160) | def note_val_started(self, step: int) -> None: method note_val_finished (line 164) | def note_val_finished(self, step: int, reward: float | None) -> None: method _build_snapshot (line 171) | def _build_snapshot(self) -> dict[str, object]: method _format_condensed_line (line 195) | def _format_condensed_line(self) -> str: method _format_full_log (line 260) | def _format_full_log(self) -> str: method _write_log_line (line 311) | def _write_log_line(self, line: str) -> None: method _refresh_status (line 317) | def _refresh_status(self, *, force: bool = False) -> None: method _count_zero_variance_groups (line 329) | def _count_zero_variance_groups(self, batch: list[TrajectoryGroup]) ->... method _group_zero_variance (line 332) | def _group_zero_variance(self, group: TrajectoryGroup) -> bool: method _compute_group_std_dev (line 339) | def _compute_group_std_dev(self, group: TrajectoryGroup) -> float: method _compute_batch_avg_std_dev (line 347) | def _compute_batch_avg_std_dev(self, batch: list[TrajectoryGroup]) -> ... method _compute_batch_avg_reward (line 353) | def _compute_batch_avg_reward(self, batch: list[TrajectoryGroup]) -> f... method _update_ewa (line 359) | def _update_ewa(self, previous: float | None, new_value: float) -> float: method _format_count (line 366) | def _format_count(value: int) -> str: method _format_scaled (line 374) | def _format_scaled(value: int, scale: int, suffix: str) -> str: method _fmt_int (line 382) | def _fmt_int(value: object) -> str: method _fmt_int_compact (line 388) | def _fmt_int_compact(value: object) -> str: method _fmt_float (line 394) | def _fmt_float(value: object, decimals: int) -> str: method _fmt_float_compact (line 402) | def _fmt_float_compact(value: object, decimals: int) -> str: FILE: src/art/pipeline_trainer/trainer.py function _to_async_iterator (line 23) | def _to_async_iterator(iterable: Iterable[T] | AsyncIterator[T]) -> Asyn... function make_group_rollout_fn (line 35) | def make_group_rollout_fn( class PipelineTrainer (line 57) | class PipelineTrainer(Generic[ScenarioT, ConfigT]): method __init__ (line 60) | def __init__( method train (line 159) | async def train(self, *, handle_signals: bool = True) -> None: method request_stop (line 256) | def request_stop(self) -> None: method _validate_backend_support (line 281) | def _validate_backend_support(self) -> None: method _skip_scenarios (line 317) | async def _skip_scenarios( method _get_next_scenario (line 334) | async def _get_next_scenario(self) -> ScenarioT | None: method _wait_for_policy (line 346) | async def _wait_for_policy(self) -> None: method _rollout_worker (line 355) | async def _rollout_worker(self, worker_id: int) -> None: method _rollout_stage (line 401) | async def _rollout_stage(self) -> None: method _training_stage (line 411) | async def _training_stage(self) -> None: method _collect_batch (line 530) | async def _collect_batch( method _check_all_failed (line 576) | def _check_all_failed(self, group: TrajectoryGroup) -> None: method _eval_stage (line 585) | async def _eval_stage(self) -> None: method _status_loop (line 610) | async def _status_loop(self) -> None: method _run_eval (line 616) | async def _run_eval(self, step: int) -> None: method _normalize_eval_items (line 671) | def _normalize_eval_items( method _apply_policy_versions (line 690) | def _apply_policy_versions( method _apply_scenario_metadata (line 703) | def _apply_scenario_metadata( method _is_group_stale (line 720) | def _is_group_stale(self, group: TrajectoryGroup, min_version: int) ->... method _record_zero_variance (line 726) | def _record_zero_variance(self, group: TrajectoryGroup) -> bool: method _trigger_collapse (line 734) | def _trigger_collapse(self) -> None: method _log_zero_variance_groups (line 760) | async def _log_zero_variance_groups(self, step: int) -> None: method _group_zero_variance (line 768) | def _group_zero_variance(group: TrajectoryGroup) -> bool: method _group_initial_version (line 775) | def _group_initial_version(self, group: TrajectoryGroup) -> int | None: method _average_steps_off_policy (line 785) | def _average_steps_off_policy( method _should_eval_step (line 798) | def _should_eval_step(self, step: int) -> bool: method _read_pipeline_state (line 805) | def _read_pipeline_state(self) -> dict[str, Any]: method _persist_state (line 809) | def _persist_state(self, training_step: int) -> None: method _is_scalar_metadata (line 819) | def _is_scalar_metadata(value: object) -> bool: method _put_output_group (line 822) | async def _put_output_group(self, group: TrajectoryGroup) -> float: method _consume_batch_rollout_timings (line 834) | def _consume_batch_rollout_timings( method _pop_float_metadata (line 845) | def _pop_float_metadata(group: TrajectoryGroup, key: str) -> float: FILE: src/art/pipeline_trainer/yes_no_maybe_pipeline.py function build_scenarios (line 30) | def build_scenarios() -> list[dict]: function reward_for_answer (line 46) | def reward_for_answer(text: str) -> float: function eval_fn (line 54) | async def eval_fn( function rollout_fn (line 82) | async def rollout_fn(model, scenario, _config) -> art.TrajectoryGroup: function main (line 102) | async def main() -> None: FILE: src/art/preprocessing/inputs.py class TrainInputs (line 11) | class TrainInputs(PackedTensors): function create_train_inputs (line 19) | def create_train_inputs( FILE: src/art/preprocessing/pack.py class PackedTensors (line 13) | class PackedTensors(TypedDict): class DiskPackedTensors (line 26) | class DiskPackedTensors(TypedDict): function packed_tensors_from_tokenized_results (line 34) | def packed_tensors_from_tokenized_results( function packed_tensors_from_dir (line 177) | def packed_tensors_from_dir(**kwargs: Unpack[DiskPackedTensors]) -> Pack... function _add_tensor_list (line 202) | def _add_tensor_list( function packed_tensors_to_dir (line 225) | def packed_tensors_to_dir(tensors: PackedTensors, dir: str) -> DiskPacke... function _get_tensor_list_info (line 246) | def _get_tensor_list_info( function plot_packed_tensors (line 262) | def plot_packed_tensors( FILE: src/art/preprocessing/tokenize.py class TokenizedResult (line 17) | class TokenizedResult: method tokens (line 33) | def tokens(self) -> list[str]: method without_prompt (line 36) | def without_prompt(self) -> "TokenizedResult": class SFTBatch (line 55) | class SFTBatch: function tokenize_trajectory_groups (line 71) | def tokenize_trajectory_groups( function tokenize_trajectory (line 154) | def tokenize_trajectory( function tokenize_sft_batch (line 366) | def tokenize_sft_batch( FILE: src/art/rewards/ruler.py class TrajectoryScore (line 25) | class TrajectoryScore(BaseModel): class Response (line 35) | class Response(BaseModel): function _judge_provider (line 53) | def _judge_provider(judge_model: str) -> str | None: function _record_ruler_cost (line 63) | def _record_ruler_cost(judge_model: str, response: ModelResponse) -> None: function ruler (line 87) | async def ruler( function ruler_score_group (line 264) | async def ruler_score_group( FILE: src/art/serverless/backend.py function _extract_step_from_wandb_artifact (line 29) | def _extract_step_from_wandb_artifact(artifact: "wandb.Artifact") -> int... function _canonicalize_upstream_metric_key (line 60) | def _canonicalize_upstream_metric_key(metric: str) -> str: function _canonicalize_upstream_metrics (line 70) | def _canonicalize_upstream_metrics(metrics: dict[str, float]) -> dict[st... class ServerlessBackend (line 78) | class ServerlessBackend(Backend): method __init__ (line 79) | def __init__( method close (line 86) | async def close(self) -> None: method register (line 89) | async def register( method delete (line 117) | async def delete( method _model_inference_name (line 137) | def _model_inference_name(self, model: "Model", step: int | None = Non... method _get_step (line 152) | async def _get_step(self, model: "Model") -> int: method _delete_checkpoint_files (line 162) | async def _delete_checkpoint_files( method _prepare_backend_for_training (line 180) | async def _prepare_backend_for_training( method train (line 190) | async def train( # type: ignore[override] method _train_model (line 321) | async def _train_model( method _train_sft (line 388) | async def _train_sft( method _experimental_pull_model_checkpoint (line 572) | async def _experimental_pull_model_checkpoint( method _experimental_pull_from_s3 (line 656) | async def _experimental_pull_from_s3( method _experimental_push_to_s3 (line 674) | async def _experimental_push_to_s3( method _experimental_fork_checkpoint (line 736) | async def _experimental_fork_checkpoint( FILE: src/art/serverless/client.py class Model (line 27) | class Model(BaseModel): class Checkpoint (line 36) | class Checkpoint(BaseModel): class CheckpointListParams (line 42) | class CheckpointListParams(TypedDict, total=False): class DeleteCheckpointsResponse (line 48) | class DeleteCheckpointsResponse(BaseModel): class ExperimentalTrainingConfig (line 53) | class ExperimentalTrainingConfig(TypedDict, total=False): class SFTTrainingConfig (line 69) | class SFTTrainingConfig(TypedDict, total=False): class TrainingJob (line 74) | class TrainingJob(BaseModel): class SFTTrainingJob (line 78) | class SFTTrainingJob(BaseModel): class TrainingJobEventListParams (line 82) | class TrainingJobEventListParams(TypedDict, total=False): class TrainingJobEvent (line 87) | class TrainingJobEvent(BaseModel): class Models (line 95) | class Models(AsyncAPIResource): method create (line 96) | async def create( method log (line 117) | async def log( method delete (line 137) | async def delete(self, *, model_id: str) -> None: method checkpoints (line 144) | def checkpoints(self) -> "Checkpoints": class Checkpoints (line 148) | class Checkpoints(AsyncAPIResource): method list (line 149) | def list( method delete (line 173) | async def delete( class TrainingJobs (line 183) | class TrainingJobs(AsyncAPIResource): method create (line 184) | async def create( method events (line 205) | def events(self) -> "TrainingJobEvents": class TrainingJobEvents (line 209) | class TrainingJobEvents(AsyncAPIResource): method list (line 210) | def list( class SFTTrainingJobs (line 233) | class SFTTrainingJobs(AsyncAPIResource): method create (line 234) | async def create( method events (line 252) | def events(self) -> "TrainingJobEvents": class Client (line 256) | class Client(AsyncAPIClient): method __init__ (line 259) | def __init__( method request (line 277) | async def request( method models (line 293) | def models(self) -> Models: method training_jobs (line 297) | def training_jobs(self) -> TrainingJobs: method sft_training_jobs (line 301) | def sft_training_jobs(self) -> SFTTrainingJobs: method qs (line 310) | def qs(self) -> Querystring: method auth_headers (line 315) | def auth_headers(self) -> dict[str, str]: method default_headers (line 321) | def default_headers(self) -> dict[str, str | Omit]: method _make_status_error (line 333) | def _make_status_error( FILE: src/art/test/test_kl_advantage.py function _make_inputs (line 8) | def _make_inputs( function test_kl_advantage_no_effect_when_disabled (line 36) | def test_kl_advantage_no_effect_when_disabled(): function test_kl_advantage_enabled (line 51) | def test_kl_advantage_enabled(): function test_kl_advantage_zero_mean_penalty (line 63) | def test_kl_advantage_zero_mean_penalty(): function test_kl_advantage_direction (line 85) | def test_kl_advantage_direction(): function test_kl_advantage_does_not_affect_when_no_ref (line 110) | def test_kl_advantage_does_not_affect_when_no_ref(): FILE: src/art/test/test_step_skipping.py function test_step_skipping (line 39) | async def test_step_skipping(): FILE: src/art/tinker/backend.py class TinkerBackend (line 15) | class TinkerBackend(LocalBackend): method __init__ (line 16) | def __init__( method _prepare_backend_for_training (line 31) | async def _prepare_backend_for_training( method _get_service (line 44) | async def _get_service(self, model: TrainableModel) -> ModelService: FILE: src/art/tinker/cookbook_v/hyperparam_utils.py function _list_param_shapes_from_safetensors_remote (line 17) | def _list_param_shapes_from_safetensors_remote( function get_lora_lr_over_full_finetune_lr (line 68) | def get_lora_lr_over_full_finetune_lr(model_name: str, lora_alpha: int =... function _get_hidden_size (line 77) | def _get_hidden_size(model_name: str) -> int: function get_lora_param_count (line 102) | def get_lora_param_count( function get_lr (line 156) | def get_lr(model_name: str, is_lora: bool = True) -> float: function get_full_finetune_param_count (line 172) | def get_full_finetune_param_count(model_name: str) -> float: function get_full_finetune_lr_multiplier (line 179) | def get_full_finetune_lr_multiplier(model_name: str): function get_lora_lr_multiplier (line 183) | def get_lora_lr_multiplier(model_name: str): FILE: src/art/tinker/cookbook_v/image_processing_utils.py function get_image_processor (line 26) | def get_image_processor(model_name: str) -> ImageProcessor: function resize_image (line 40) | def resize_image(image: Image.Image, max_size: int) -> Image.Image: FILE: src/art/tinker/cookbook_v/renderers/__init__.py function register_renderer (line 51) | def register_renderer( function get_registered_renderer_names (line 70) | def get_registered_renderer_names() -> list[str]: function is_renderer_registered (line 75) | def is_renderer_registered(name: str) -> bool: function unregister_renderer (line 80) | def unregister_renderer(name: str) -> bool: function get_renderer (line 95) | def get_renderer( FILE: src/art/tinker/cookbook_v/renderers/base.py class StrictBase (line 31) | class StrictBase(pydantic.BaseModel): method __str__ (line 38) | def __str__(self) -> str: class ToolCall (line 42) | class ToolCall(StrictBase): class FunctionBody (line 59) | class FunctionBody(pydantic.BaseModel): class UnparsedToolCall (line 82) | class UnparsedToolCall(StrictBase): class TextPart (line 104) | class TextPart(TypedDict): class ImagePart (line 112) | class ImagePart(TypedDict): class ThinkingPart (line 121) | class ThinkingPart(TypedDict): class StreamingMessageHeader (line 137) | class StreamingMessageHeader: class StreamingTextDelta (line 148) | class StreamingTextDelta: class StreamingThinkingDelta (line 161) | class StreamingThinkingDelta: class Utf8TokenDecoder (line 187) | class Utf8TokenDecoder: method __post_init__ (line 207) | def __post_init__(self) -> None: method _is_valid_decode (line 216) | def _is_valid_decode(self, text: str) -> bool: method decode (line 225) | def decode(self, tokens: list[int]) -> str | None: method flush (line 267) | def flush(self) -> str: method reset (line 284) | def reset(self) -> None: method has_pending (line 288) | def has_pending(self) -> bool: class Message (line 301) | class Message(TypedDict): class RenderContext (line 344) | class RenderContext: class ToolSpec (line 371) | class ToolSpec(TypedDict): function ensure_text (line 400) | def ensure_text(content: Content) -> str: function ensure_list (line 417) | def ensure_list(content: Content) -> list[ContentPart]: function remove_thinking (line 424) | def remove_thinking(parts: list[ContentPart]) -> list[ContentPart]: function get_text_content (line 429) | def get_text_content(message: Message) -> str: function format_content_as_string (line 441) | def format_content_as_string(content: Content, separator: str = "\n") ->... function _parse_tool_call_json (line 473) | def _parse_tool_call_json( function parse_content_blocks (line 513) | def parse_content_blocks( function parse_think_blocks (line 583) | def parse_think_blocks(content: str) -> list[ContentPart] | None: function _tool_call_payload (line 623) | def _tool_call_payload(tool_call: ToolCall) -> dict[str, object]: class RenderedMessage (line 633) | class RenderedMessage: class TrainOnWhat (line 677) | class TrainOnWhat(StrEnum): function _unpickle_renderer (line 687) | def _unpickle_renderer( class Renderer (line 709) | class Renderer(ABC): method __init__ (line 739) | def __init__(self, tokenizer: Tokenizer): method __reduce__ (line 742) | def __reduce__(self) -> tuple: method has_extension_property (line 763) | def has_extension_property(self) -> bool: method _bos_tokens (line 782) | def _bos_tokens(self) -> list[int]: method get_stop_sequences (line 786) | def get_stop_sequences(self) -> list[str] | list[int]: method render_message (line 791) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method parse_response (line 811) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method to_openai_message (line 824) | def to_openai_message(self, message: Message) -> dict: method create_conversation_prefix_with_tools (line 896) | def create_conversation_prefix_with_tools( method _get_generation_suffix (line 917) | def _get_generation_suffix(self, role: Role, ctx: RenderContext) -> li... method build_generation_prompt (line 941) | def build_generation_prompt( method build_supervised_examples (line 1004) | def build_supervised_examples( method build_supervised_example (line 1028) | def build_supervised_example( function tokens_weights_from_strings_weights (line 1165) | def tokens_weights_from_strings_weights( function parse_response_for_stop_token (line 1184) | def parse_response_for_stop_token( class ImageProcessorProtocol (line 1211) | class ImageProcessorProtocol(Protocol): method get_number_of_image_patches (line 1215) | def get_number_of_image_patches( method get_resize_config (line 1220) | def get_resize_config(self, image_data: dict[str, Any]) -> dict[str, A... function image_to_chunk (line 1224) | def image_to_chunk( FILE: src/art/tinker/cookbook_v/renderers/deepseek_v3.py class _DeepSeekV3BaseRenderer (line 29) | class _DeepSeekV3BaseRenderer(Renderer): method __init__ (line 44) | def __init__( method has_extension_property (line 55) | def has_extension_property(self) -> bool: method render_message (line 66) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method _get_special_token (line 184) | def _get_special_token(self, name: str) -> int: method _bos_tokens (line 192) | def _bos_tokens(self) -> list[int]: method _end_message_token (line 196) | def _end_message_token(self) -> int: method get_stop_sequences (line 199) | def get_stop_sequences(self) -> list[int]: method _parse_deepseek_tool_calls (line 202) | def _parse_deepseek_tool_calls( method parse_response (line 249) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method to_openai_message (line 285) | def to_openai_message(self, message: Message) -> dict: method create_conversation_prefix_with_tools (line 332) | def create_conversation_prefix_with_tools( class DeepSeekV3ThinkingRenderer (line 376) | class DeepSeekV3ThinkingRenderer(_DeepSeekV3BaseRenderer): method render_message (line 392) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method build_generation_prompt (line 426) | def build_generation_prompt( method parse_response (line 445) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: class DeepSeekV3DisableThinkingRenderer (line 463) | class DeepSeekV3DisableThinkingRenderer(_DeepSeekV3BaseRenderer): method has_extension_property (line 477) | def has_extension_property(self) -> bool: method render_message (line 481) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... FILE: src/art/tinker/cookbook_v/renderers/gpt_oss.py function _json_type_to_typescript (line 34) | def _json_type_to_typescript(schema: dict) -> str: function _json_schema_to_typescript (line 67) | def _json_schema_to_typescript(schema: dict) -> str: function _schema_comments (line 84) | def _schema_comments(schema: dict) -> list[str]: function _format_parameters_block (line 102) | def _format_parameters_block(schema: dict) -> str: function _format_tool_definition (line 131) | def _format_tool_definition(tool: ToolSpec) -> str: class GptOssRenderer (line 143) | class GptOssRenderer(Renderer): method __init__ (line 192) | def __init__( method render_message (line 210) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method _render_tool_calls (line 284) | def _render_tool_calls(self, tool_calls: list[ToolCall]) -> str: method _render_tool_result_message (line 304) | def _render_tool_result_message( method _get_system_message (line 352) | def _get_system_message(self) -> Message | None: method _bos_tokens (line 371) | def _bos_tokens(self) -> list[int]: method _warn_if_user_system_message (line 375) | def _warn_if_user_system_message(self, messages: list[Message]) -> None: method build_generation_prompt (line 386) | def build_generation_prompt( method build_supervised_example (line 399) | def build_supervised_example( method _return_token (line 412) | def _return_token(self) -> int: method _call_token (line 418) | def _call_token(self) -> int: method get_stop_sequences (line 423) | def get_stop_sequences(self) -> list[int]: method parse_response (line 428) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method to_openai_message (line 464) | def to_openai_message(self, message: Message) -> dict: method _parse_harmony_output (line 512) | def _parse_harmony_output( method _parse_harmony_messages (line 557) | def _parse_harmony_messages(self, content: str) -> list[dict[str, str ... method create_conversation_prefix_with_tools (line 621) | def create_conversation_prefix_with_tools( FILE: src/art/tinker/cookbook_v/renderers/kimi_k2.py function _split_tool_calls_section (line 47) | def _split_tool_calls_section(content: str) -> tuple[str, str | None]: function _extract_tool_name (line 55) | def _extract_tool_name(tool_id: str) -> str: function _parse_tool_calls_section (line 64) | def _parse_tool_calls_section( function _longest_matching_suffix_prefix (line 101) | def _longest_matching_suffix_prefix(text: str, tag: str) -> int: class KimiK2StreamingParser (line 135) | class KimiK2StreamingParser: method __post_init__ (line 163) | def __post_init__(self) -> None: method feed (line 173) | def feed(self, token: int) -> Iterator[MessageDelta]: method _emit_deltas (line 208) | def _emit_deltas(self) -> Iterator[MessageDelta]: method finish (line 280) | def finish(self) -> Iterator[MessageDelta]: method reset (line 343) | def reset(self) -> None: class KimiK2Renderer (line 355) | class KimiK2Renderer(Renderer): method __init__ (line 372) | def __init__(self, tokenizer: Tokenizer, strip_thinking_from_history: ... method _ensure_system_message (line 376) | def _ensure_system_message(self, messages: list[Message]) -> list[Mess... method render_message (line 406) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method _encode_multipart_content (line 508) | def _encode_multipart_content( method build_generation_prompt (line 515) | def build_generation_prompt( method build_supervised_examples (line 564) | def build_supervised_examples( method build_supervised_example (line 615) | def build_supervised_example( method _end_message_token (line 712) | def _end_message_token(self) -> int: method get_stop_sequences (line 719) | def get_stop_sequences(self) -> list[int]: method parse_response (line 722) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method parse_response_streaming (line 748) | def parse_response_streaming(self, response: list[int]) -> Iterator[Me... method to_openai_message (line 785) | def to_openai_message(self, message: Message) -> dict: method create_conversation_prefix_with_tools (line 832) | def create_conversation_prefix_with_tools( FILE: src/art/tinker/cookbook_v/renderers/kimi_k25.py class KimiK25Renderer (line 21) | class KimiK25Renderer(KimiK2Renderer): method __init__ (line 40) | def __init__( method _encode_multipart_content (line 51) | def _encode_multipart_content( method _image_prefix (line 87) | def _image_prefix(self) -> str: method _image_suffix (line 91) | def _image_suffix(self) -> str: method build_generation_prompt (line 94) | def build_generation_prompt( method create_conversation_prefix_with_tools (line 106) | def create_conversation_prefix_with_tools( class KimiK25DisableThinkingRenderer (line 134) | class KimiK25DisableThinkingRenderer(KimiK25Renderer): method build_generation_prompt (line 146) | def build_generation_prompt( FILE: src/art/tinker/cookbook_v/renderers/kimi_k2_5_tool_declaration_ts.py class _SchemaRegistry (line 19) | class _SchemaRegistry: method __init__ (line 22) | def __init__(self): method register_definitions (line 26) | def register_definitions(self, defs: dict[str, Any]): method resolve_ref (line 33) | def resolve_ref(self, ref: str) -> dict[str, Any]: function _format_description (line 47) | def _format_description(description: str, indent: str = "") -> str: class _BaseType (line 53) | class _BaseType: method __init__ (line 57) | def __init__( method to_typescript_style (line 68) | def to_typescript_style(self, indent: str = "") -> str: method format_docstring (line 71) | def format_docstring(self, indent: str) -> str: class _ParameterTypeScalar (line 85) | class _ParameterTypeScalar(_BaseType): method __init__ (line 88) | def __init__(self, type: str, extra_props: dict[str, Any] | None = None): method to_typescript_style (line 101) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeObject (line 108) | class _ParameterTypeObject(_BaseType): method __init__ (line 112) | def __init__( method to_typescript_style (line 152) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeArray (line 192) | class _ParameterTypeArray(_BaseType): method __init__ (line 195) | def __init__( method to_typescript_style (line 208) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeEnum (line 225) | class _ParameterTypeEnum(_BaseType): method __init__ (line 229) | def __init__(self, json_schema_object: dict[str, Any]): method to_typescript_style (line 258) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeAnyOf (line 264) | class _ParameterTypeAnyOf(_BaseType): method __init__ (line 267) | def __init__( method to_typescript_style (line 277) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeUnion (line 281) | class _ParameterTypeUnion(_BaseType): method __init__ (line 284) | def __init__(self, json_schema_object: dict[str, Any]): method to_typescript_style (line 298) | def to_typescript_style(self, indent: str = "") -> str: class _ParameterTypeRef (line 302) | class _ParameterTypeRef(_BaseType): method __init__ (line 306) | def __init__(self, json_schema_object: dict[str, Any], registry: _Sche... method to_typescript_style (line 318) | def to_typescript_style(self, indent: str = "") -> str: class _Parameter (line 334) | class _Parameter: method parse_extended (line 346) | def parse_extended(cls, attributes: dict[str, Any]) -> "_Parameter": method to_typescript_style (line 357) | def to_typescript_style(self, indent: str = "") -> str: function _parse_parameter_type (line 374) | def _parse_parameter_type( function _openai_function_to_typescript_style (line 409) | def _openai_function_to_typescript_style( function encode_tools_to_typescript_style (line 461) | def encode_tools_to_typescript_style( FILE: src/art/tinker/cookbook_v/renderers/llama3.py class Llama3Renderer (line 15) | class Llama3Renderer(Renderer): method has_extension_property (line 38) | def has_extension_property(self) -> bool: method render_message (line 42) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method _bos_tokens (line 58) | def _bos_tokens(self) -> list[int]: method _end_message_token (line 62) | def _end_message_token(self) -> int: method get_stop_sequences (line 66) | def get_stop_sequences(self) -> list[int]: method parse_response (line 69) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: FILE: src/art/tinker/cookbook_v/renderers/qwen3.py function _merge_consecutive_text_parts (line 38) | def _merge_consecutive_text_parts( class Qwen3Renderer (line 60) | class Qwen3Renderer(Renderer): method __init__ (line 86) | def __init__(self, tokenizer: Tokenizer, strip_thinking_from_history: ... method has_extension_property (line 105) | def has_extension_property(self) -> bool: method _get_qwen_role_for_message (line 116) | def _get_qwen_role_for_message(self, message: Message) -> str: method _wrap_qwen_tool_response (line 126) | def _wrap_qwen_tool_response(self, content: str) -> str: method render_message (line 130) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method _end_message_token (line 189) | def _end_message_token(self) -> int: method get_stop_sequences (line 196) | def get_stop_sequences(self) -> list[int]: method parse_response (line 199) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method to_openai_message (line 232) | def to_openai_message(self, message: Message) -> dict: method _to_openai_tool_arguments (line 286) | def _to_openai_tool_arguments(self, arguments: str) -> str | dict: method create_conversation_prefix_with_tools (line 294) | def create_conversation_prefix_with_tools( class Qwen3DisableThinkingRenderer (line 340) | class Qwen3DisableThinkingRenderer(Qwen3Renderer): method render_message (line 353) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... class Qwen3InstructRenderer (line 385) | class Qwen3InstructRenderer(Qwen3Renderer): method has_extension_property (line 395) | def has_extension_property(self) -> bool: class Qwen3VLRenderer (line 404) | class Qwen3VLRenderer(Qwen3Renderer): method __init__ (line 424) | def __init__( method _format_thinking_text (line 436) | def _format_thinking_text(self, thinking: str) -> str: method _assistant_header_suffix (line 440) | def _assistant_header_suffix(self, message: Message, ctx: RenderContex... method _preprocess_message_parts (line 444) | def _preprocess_message_parts( method _wrap_qwen_tool_response_chunks (line 489) | def _wrap_qwen_tool_response_chunks( method _format_tool_calls_chunks (line 499) | def _format_tool_calls_chunks(self, message: Message) -> list[ImagePar... method render_message (line 516) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... class Qwen3VLInstructRenderer (line 574) | class Qwen3VLInstructRenderer(Qwen3VLRenderer): FILE: src/art/tinker/cookbook_v/renderers/qwen3_5.py class Qwen3_5Renderer (line 45) | class Qwen3_5Renderer(Qwen3VLRenderer): method _get_generation_suffix (line 57) | def _get_generation_suffix(self, role: Role, ctx: RenderContext) -> li... method _assistant_header_suffix (line 67) | def _assistant_header_suffix(self, message: Message, ctx: RenderContex... method _format_thinking_text (line 81) | def _format_thinking_text(self, thinking: str) -> str: method _to_openai_tool_arguments (line 85) | def _to_openai_tool_arguments(self, arguments: str) -> str | dict: method _parse_qwen3_5_tool_call_xml (line 89) | def _parse_qwen3_5_tool_call_xml( method parse_response (line 139) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method _format_tool_call_xml (line 209) | def _format_tool_call_xml(self, tool_call: ToolCall) -> str: method _format_tool_calls_chunks (line 226) | def _format_tool_calls_chunks(self, message: Message) -> list[ImagePar... method create_conversation_prefix_with_tools (line 239) | def create_conversation_prefix_with_tools( class Qwen3_5DisableThinkingRenderer (line 294) | class Qwen3_5DisableThinkingRenderer(Qwen3_5Renderer): method _get_generation_suffix (line 303) | def _get_generation_suffix(self, role: Role, ctx: RenderContext) -> li... FILE: src/art/tinker/cookbook_v/renderers/role_colon.py class RoleColonRenderer (line 15) | class RoleColonRenderer(Renderer): method has_extension_property (line 29) | def has_extension_property(self) -> bool: method render_message (line 33) | def render_message(self, message: Message, ctx: RenderContext) -> Rend... method get_stop_sequences (line 52) | def get_stop_sequences(self) -> list[str]: method parse_response (line 55) | def parse_response(self, response: list[int]) -> tuple[Message, bool]: method _bos_tokens (line 89) | def _bos_tokens(self) -> list[int]: method create_conversation_prefix_with_tools (line 96) | def create_conversation_prefix_with_tools( FILE: src/art/tinker/cookbook_v/tokenizer_utils.py function register_tokenizer (line 27) | def register_tokenizer( function get_registered_tokenizer_names (line 46) | def get_registered_tokenizer_names() -> list[str]: function is_tokenizer_registered (line 51) | def is_tokenizer_registered(name: str) -> bool: function unregister_tokenizer (line 56) | def unregister_tokenizer(name: str) -> bool: function get_tokenizer (line 71) | def get_tokenizer(model_name: str) -> Tokenizer: function _get_hf_tokenizer (line 84) | def _get_hf_tokenizer(model_name: str) -> Tokenizer: FILE: src/art/tinker/cookbook_v/utils/misc_utils.py function timed (line 19) | def timed(key: str, metrics: dict[str, Any]): function dict_mean (line 30) | def dict_mean(list_of_dicts: list[dict[str, float | int]]) -> dict[str, ... function all_same (line 38) | def all_same(xs: list[Any]) -> bool: function lookup_func (line 42) | def lookup_func(path_to_func: str, default_module: str | None = None): function split_list (line 58) | def split_list(lst: Sequence[T], num_splits: int) -> list[list[T]]: function concat_lists (line 90) | def concat_lists(list_of_lists: list[list[Any]]) -> list[Any]: function not_none (line 94) | def not_none(x: T | None) -> T: FILE: src/art/tinker/prefix_cache.py class PrefixEntry (line 9) | class PrefixEntry: class PrefixCacheStats (line 15) | class PrefixCacheStats: class _RadixEdge (line 29) | class _RadixEdge: method __init__ (line 32) | def __init__(self, label: tuple[int, ...], child: _RadixNode) -> None: class _RadixNode (line 37) | class _RadixNode: method __init__ (line 40) | def __init__( function _common_prefix_len (line 49) | def _common_prefix_len( class LRUTrieCache (line 59) | class LRUTrieCache: method __init__ (line 62) | def __init__(self, max_entries: int = 16_384) -> None: method lookup (line 70) | def lookup(self, rendered_tokens: Sequence[int]) -> PrefixEntry | None: method insert (line 99) | def insert(self, rendered_prefix: Sequence[int], raw_prefix: Sequence[... method _evict (line 148) | def _evict(self) -> None: method _prune (line 155) | def _prune(self, node: _RadixNode) -> None: method snapshot_stats (line 181) | def snapshot_stats(self) -> dict[str, int | float]: method _node_count (line 201) | def _node_count(self) -> int: FILE: src/art/tinker/renderers.py function get_renderer_name (line 1) | def get_renderer_name(base_model: str) -> str: FILE: src/art/tinker/server.py class ModelList (line 41) | class ModelList(BaseModel): class ModelUpsert (line 46) | class ModelUpsert(BaseModel): class OpenAICompatibleTinkerServer (line 51) | class OpenAICompatibleTinkerServer: method models (line 64) | def models(self) -> dict[str, str]: method models (line 70) | def models(self, models: dict[str, str]) -> None: method start (line 75) | async def start(self) -> tuple[str, int]: method stop (line 101) | async def stop(self) -> None: method _get_request_tenant (line 109) | def _get_request_tenant( method _run (line 123) | async def _run(self, host: str, port: int) -> None: method _default_num_workers (line 271) | def _default_num_workers(self) -> int: method _get_tenant (line 277) | def _get_tenant(self, api_key: str) -> "OpenAICompatibleTinkerServerTe... class OpenAICompatibleTinkerServerSamplableModel (line 286) | class OpenAICompatibleTinkerServerSamplableModel: method sampling_client (line 294) | async def sampling_client(self) -> AsyncGenerator[tinker.SamplingClien... class OpenAICompatibleTinkerServerTenant (line 308) | class OpenAICompatibleTinkerServerTenant: method __init__ (line 309) | def __init__(self, api_key: str, max_concurrent_sampling_clients: int)... method get_samplable_model (line 321) | async def get_samplable_model( method _load_samplable_model (line 345) | async def _load_samplable_model( class OpenAICompatibleTinkerServerWorker (line 383) | class OpenAICompatibleTinkerServerWorker: method prompt_tokens (line 386) | async def prompt_tokens( method chat_completion_and_token_discrepancies (line 402) | async def chat_completion_and_token_discrepancies( method _get_renderer (line 486) | def _get_renderer(self, base_model: str) -> renderers.Renderer: function get_free_port (line 496) | def get_free_port(host: str | None = None) -> int: FILE: src/art/tinker/service.py function log_timing (line 27) | def log_timing(msg: str) -> Generator[None, None, None]: class TinkerService (line 36) | class TinkerService: method start_openai_server (line 43) | async def start_openai_server( method vllm_engine_is_sleeping (line 55) | async def vllm_engine_is_sleeping(self) -> bool: method train (line 58) | async def train( method register_lora_for_step (line 147) | async def register_lora_for_step(self, step: int, checkpoint_dir: str)... method train_sft (line 164) | async def train_sft( method delete_checkpoints (line 172) | async def delete_checkpoints(self, steps_to_keep: list[int]) -> None: method _state_task (line 194) | def _state_task(self) -> asyncio.Task["TinkerState"]: method _get_state (line 197) | async def _get_state(self) -> "TinkerState": method _build_models_dict (line 233) | def _build_models_dict(self, base_model: str) -> dict[str, str]: method _checkpoints_path (line 248) | def _checkpoints_path(self) -> Path: method _get_last_checkpoint_dir (line 251) | def _get_last_checkpoint_dir(self) -> Path | None: method _save_checkpoint (line 260) | async def _save_checkpoint( function delete_checkpoint (line 283) | async def delete_checkpoint( class TinkerState (line 300) | class TinkerState: FILE: src/art/tinker_native/backend.py function _canonicalize_upstream_metric_key (line 75) | def _canonicalize_upstream_metric_key(metric: str) -> str: class ModelState (line 86) | class ModelState: class TinkerNativeModelConfig (line 106) | class TinkerNativeModelConfig: class TinkerNativeBackend (line 111) | class TinkerNativeBackend(Backend): method __init__ (line 115) | def __init__( method _env_enabled (line 132) | def _env_enabled(self, env_name: str) -> bool: method _timestamp (line 138) | def _timestamp(self) -> str: method _tinker_call (line 141) | async def _tinker_call( method _tinker_train_call (line 162) | async def _tinker_train_call(self, label: str, awaitable: Awaitable[T]... method _tinker_sample_call (line 170) | async def _tinker_sample_call(self, label: str, awaitable: Awaitable[T... method close (line 178) | async def close(self) -> None: method register (line 183) | async def register(self, model: Model) -> None: method _prepare_backend_for_training (line 203) | async def _prepare_backend_for_training( method train (line 231) | async def train( # type: ignore[override] method _get_step (line 350) | async def _get_step(self, model: TrainableModel) -> int: method _delete_checkpoint_files (line 356) | async def _delete_checkpoint_files( method _model_inference_name (line 363) | def _model_inference_name(self, model: Model, step: int | None = None)... method _run_openai_server (line 372) | async def _run_openai_server( method _crash_on_server_exit (line 495) | def _crash_on_server_exit(self, task: asyncio.Task[None]) -> None: method _wait_for_server_ready (line 506) | async def _wait_for_server_ready( method _build_model_state (line 527) | async def _build_model_state(self, model: TrainableModel) -> ModelState: method _resolve_model_config (line 613) | def _resolve_model_config(self, model: TrainableModel) -> TinkerNative... method _list_checkpoints (line 642) | async def _list_checkpoints( method _get_sampler_client (line 670) | async def _get_sampler_client( method _normalize_messages (line 700) | def _normalize_messages(self, messages: Iterable[Any]) -> list[dict[st... method _normalize_tools (line 709) | def _normalize_tools( method _parse_model_name (line 722) | def _parse_model_name(self, model_name: str | None) -> tuple[str, int]: method _format_response_model (line 745) | def _format_response_model(self, model_name: str, step: int) -> str: method _create_training_client_from_checkpoint (line 749) | async def _create_training_client_from_checkpoint( method _save_checkpoint (line 783) | async def _save_checkpoint( method _save_sampler_weights (line 806) | async def _save_sampler_weights( method _save_training_state (line 819) | async def _save_training_state( method _persist_model_state (line 832) | def _persist_model_state(self, model: TrainableModel, state: ModelStat... method _experimental_fork_checkpoint (line 840) | async def _experimental_fork_checkpoint( FILE: src/art/tinker_native/data.py function create_conversation_prefix_with_tools (line 16) | def create_conversation_prefix_with_tools( function compute_advantages (line 23) | def compute_advantages( function convert_openai_messages_to_renderer_format (line 38) | def convert_openai_messages_to_renderer_format( function parse_completion_to_openai_message (line 112) | def parse_completion_to_openai_message( function _trajectory_has_choice (line 120) | def _trajectory_has_choice(trajectory: Trajectory) -> bool: function trajectory_groups_to_datums (line 131) | def trajectory_groups_to_datums( function iter_trajectory_histories (line 163) | def iter_trajectory_histories(trajectory: Trajectory) -> Iterable[History]: function find_last_choice (line 171) | def find_last_choice( function extract_logprobs_from_choice (line 181) | def extract_logprobs_from_choice( function history_to_datum (line 207) | def history_to_datum( function build_datum (line 241) | def build_datum( FILE: src/art/trajectories.py class PydanticException (line 24) | class PydanticException(pydantic.BaseModel): class History (line 30) | class History(pydantic.BaseModel): method messages (line 34) | def messages(self) -> Messages: class Trajectory (line 38) | class Trajectory(pydantic.BaseModel): method log (line 50) | def log(self, message: str) -> None: method finish (line 53) | def finish(self) -> "Trajectory": method track_duration (line 59) | async def track_duration(self, metric_name: str) -> AsyncGenerator[Non... method __str__ (line 68) | def __str__(self) -> str: method messages (line 71) | def messages(self) -> Messages: method for_logging (line 75) | def for_logging(self) -> dict[str, Any]: function get_messages (line 97) | def get_messages(messages_and_choices: MessagesAndChoices) -> Messages: class TrajectoryGroup (line 130) | class TrajectoryGroup(pydantic.BaseModel): method __init__ (line 137) | def __init__( method __copy__ (line 181) | def __copy__(self): method __deepcopy__ (line 197) | def __deepcopy__(self, memo: dict[int, Any] | None = None): method log (line 223) | def log(self, message: str) -> None: method __iter__ (line 226) | def __iter__(self) -> Iterator[Trajectory]: # type: ignore[override] method __len__ (line 229) | def __len__(self) -> int: method __new__ (line 233) | def __new__( method __new__ (line 244) | def __new__( method __new__ (line 254) | def __new__( FILE: src/art/transformers/patches.py function _patched_preprocess_mask_arguments (line 14) | def _patched_preprocess_mask_arguments( function patch_preprocess_mask_arguments (line 36) | def patch_preprocess_mask_arguments() -> None: FILE: src/art/types.py class TrainConfig (line 17) | class TrainConfig(pydantic.BaseModel): class TrainSFTConfig (line 22) | class TrainSFTConfig(pydantic.BaseModel): class TrainResult (line 36) | class TrainResult: class LocalTrainResult (line 49) | class LocalTrainResult(TrainResult): class ServerlessTrainResult (line 63) | class ServerlessTrainResult(TrainResult): FILE: src/art/unsloth/service.py class SupportsLoadLora (line 52) | class SupportsLoadLora(Protocol): method load_lora (line 55) | def load_lora(self, lora_path: str, load_tensors: bool = True) -> LoRA... class _StopTrainInputs (line 58) | class _StopTrainInputs: function precalculate_new_logprobs (line 67) | def precalculate_new_logprobs( function process_train_batch (line 99) | async def process_train_batch( function save_checkpoint (line 158) | def save_checkpoint( function _get_trainer_optimizer (line 203) | def _get_trainer_optimizer(trainer: GRPOTrainer) -> Optimizer: class CausalLM (line 215) | class CausalLM(PreTrainedModel, GenerationMixin): class UnslothState (line 222) | class UnslothState: method offload_to_cpu (line 232) | def offload_to_cpu(self) -> None: method reload_to_gpu (line 279) | def reload_to_gpu(self, device: str = "cuda:0") -> None: class UnslothService (line 314) | class UnslothService: method is_dedicated (line 331) | def is_dedicated(self) -> bool: method _next_lora_id (line 334) | def _next_lora_id(self) -> int: method aclose (line 339) | async def aclose(self) -> None: method _start_vllm_subprocess (line 361) | async def _start_vllm_subprocess( method _reload_adapter (line 454) | async def _reload_adapter(self, checkpoint_path: str, step: int) -> None: method close (line 479) | def close(self) -> None: method start_openai_server (line 498) | async def start_openai_server( method vllm_engine_is_sleeping (line 533) | async def vllm_engine_is_sleeping(self) -> bool: method register_lora_for_step (line 538) | async def register_lora_for_step(self, step: int, checkpoint_dir: str)... method _reset_optimizer_if_mode_changed (line 567) | def _reset_optimizer_if_mode_changed( method train (line 588) | async def train( method _train_dedicated (line 607) | async def _train_dedicated( method _train_shared (line 668) | async def _train_shared( method train_sft (line 791) | async def train_sft( method _state (line 961) | def _state(self) -> UnslothState: method llm (line 1040) | def llm(self) -> asyncio.Task[AsyncLLM]: function do_sleep (line 1058) | def do_sleep(*, level: int) -> None: function do_wake_up (line 1124) | def do_wake_up() -> None: FILE: src/art/unsloth/train.py class StopTrainingLoop (line 42) | class StopTrainingLoop(Exception): function _canonicalize_upstream_metric_key (line 46) | def _canonicalize_upstream_metric_key(metric: str) -> str: function _canonicalize_upstream_metrics (line 56) | def _canonicalize_upstream_metrics(metrics: dict[str, float]) -> dict[st... function train (line 64) | async def train( function get_compute_loss_fn (line 89) | def get_compute_loss_fn(trainer: "GRPOTrainer") -> Callable[..., torch.T... function get_log_fn (line 228) | def get_log_fn( function calculate_attn_bias (line 254) | def calculate_attn_bias( function calculate_mask (line 281) | def calculate_mask( function _use_adapter (line 307) | def _use_adapter(trainer: "GRPOTrainer", adapter_path: str): function calculate_logprobs (line 326) | def calculate_logprobs( function _calculate_logprobs (line 362) | def _calculate_logprobs( function gc_and_empty_cuda_cache (line 416) | def gc_and_empty_cuda_cache(n: int = 3) -> None: FILE: src/art/utils/benchmark_rollout.py function benchmark_rollout (line 8) | async def benchmark_rollout( FILE: src/art/utils/benchmarking/aggregate_trajectories.py function load_aggregated_trajectories (line 13) | async def load_aggregated_trajectories( function _load_history_timestamps (line 92) | def _load_history_timestamps( function load_latest_metrics (line 134) | async def load_latest_metrics( FILE: src/art/utils/benchmarking/charts/percentage_comparison_bar_chart.py function percentage_comparison_bar_chart (line 13) | def percentage_comparison_bar_chart( FILE: src/art/utils/benchmarking/charts/training_progress_chart.py function training_progress_chart (line 15) | def training_progress_chart( FILE: src/art/utils/benchmarking/filter_model_split.py function filter_rename_model_split (line 12) | def filter_rename_model_split( FILE: src/art/utils/benchmarking/load_trajectories.py function load_trajectories (line 27) | async def load_trajectories( FILE: src/art/utils/benchmarking/log_constant_metrics_wandb.py function log_constant_metrics_wandb (line 8) | async def log_constant_metrics_wandb( FILE: src/art/utils/benchmarking/pull_model_trajectories.py function pull_model_trajectories (line 7) | async def pull_model_trajectories(model: ArtModel) -> None: FILE: src/art/utils/benchmarking/types.py class BenchmarkModelKey (line 1) | class BenchmarkModelKey: method __init__ (line 6) | def __init__( method __str__ (line 13) | def __str__(self): FILE: src/art/utils/convert_moe_lora.py function _has_fused_moe_lora (line 23) | def _has_fused_moe_lora(tensors: dict[str, torch.Tensor]) -> bool: function _infer_moe_params (line 31) | def _infer_moe_params( function convert_fused_moe_lora (line 69) | def convert_fused_moe_lora( function convert_checkpoint_if_needed (line 144) | def convert_checkpoint_if_needed(checkpoint_dir: str) -> None: FILE: src/art/utils/deployment/common.py class DeploymentConfig (line 15) | class DeploymentConfig(BaseModel): class DeploymentResult (line 21) | class DeploymentResult(BaseModel): function deploy_model (line 28) | async def deploy_model( FILE: src/art/utils/deployment/legacy.py class LoRADeploymentProvider (line 10) | class LoRADeploymentProvider(str, Enum): class LoRADeploymentJob (line 17) | class LoRADeploymentJob(BaseModel): FILE: src/art/utils/deployment/together.py class TogetherDeploymentConfig (line 25) | class TogetherDeploymentConfig(DeploymentConfig): class TogetherJobStatus (line 41) | class TogetherJobStatus(str, Enum): class TogetherJob (line 48) | class TogetherJob(BaseModel): function _init_session (line 63) | def _init_session() -> aiohttp.ClientSession: function _model_checkpoint_id (line 77) | def _model_checkpoint_id(model: "TrainableModel", step: int) -> str: function _upload_model (line 82) | async def _upload_model( function _convert_job_status (line 114) | def _convert_job_status(status: str, message: str | None = None) -> Toge... function _find_existing_job_id (line 129) | async def _find_existing_job_id( function _check_job_status (line 147) | async def _check_job_status(job_id: str, verbose: bool = False) -> Toget... function _wait_for_job (line 173) | async def _wait_for_job(job_id: str, verbose: bool = False) -> TogetherJob: function deploy_to_together (line 189) | async def deploy_to_together( FILE: src/art/utils/deployment/wandb.py class WandbDeploymentConfig (line 14) | class WandbDeploymentConfig(DeploymentConfig): function deploy_wandb (line 36) | def deploy_wandb( FILE: src/art/utils/format_message.py function format_message (line 8) | def format_message(message: Message) -> str: FILE: src/art/utils/get_model_step.py function get_step_from_dir (line 10) | def get_step_from_dir(output_dir: str) -> int: function get_model_step (line 26) | def get_model_step(model: "TrainableModel", art_path: str) -> int: FILE: src/art/utils/get_repo_root_path.py function get_repo_root_path (line 4) | def get_repo_root_path() -> str: FILE: src/art/utils/group_aggregate.py function group_aggregate (line 8) | def group_aggregate( FILE: src/art/utils/iterate_dataset.py class DatasetBatch (line 12) | class DatasetBatch(Generic[T]): function iterate_dataset (line 21) | def iterate_dataset( FILE: src/art/utils/limit_concurrency.py function limit_concurrency (line 6) | def limit_concurrency(n: int, derive_key: Optional[Callable[..., str]] =... FILE: src/art/utils/litellm.py function convert_litellm_choice_to_openai (line 20) | def convert_litellm_choice_to_openai( FILE: src/art/utils/log_http_errors.py function log_http_errors (line 6) | def log_http_errors(func): FILE: src/art/utils/logging.py class _C (line 5) | class _C: function _ts (line 19) | def _ts(): function info (line 23) | def info(msg): function step (line 27) | def step(msg): function ok (line 31) | def ok(msg): function warn (line 35) | def warn(msg): function err (line 39) | def err(msg): function dim (line 43) | def dim(msg): FILE: src/art/utils/model_config.py class ModelConfig (line 7) | class ModelConfig: function detect_chat_template_parts (line 25) | def detect_chat_template_parts( function get_instruction_response_parts (line 72) | def get_instruction_response_parts( FILE: src/art/utils/old_benchmarking/calculate_step_metrics.py function calculate_step_std_dev (line 7) | def calculate_step_std_dev(trajectory_groups: list[TrajectoryGroup]) -> ... FILE: src/art/utils/old_benchmarking/display_image_grid.py function display_image_grid (line 4) | def display_image_grid(image_paths: list[str], images_per_row: int = 2): FILE: src/art/utils/old_benchmarking/generate_comparison_table.py function generate_comparison_table (line 7) | def generate_comparison_table( FILE: src/art/utils/old_benchmarking/generate_line_graphs.py function generate_line_graphs (line 19) | def generate_line_graphs( FILE: src/art/utils/old_benchmarking/load_benchmarked_models.py function load_benchmarked_models (line 18) | def load_benchmarked_models( FILE: src/art/utils/old_benchmarking/types.py class BenchmarkedModelKey (line 4) | class BenchmarkedModelKey: method __init__ (line 9) | def __init__(self, model: str, split: str, step_indices: list[int] | N... method __str__ (line 14) | def __str__(self): class BenchmarkedModelStep (line 24) | class BenchmarkedModelStep: method __init__ (line 29) | def __init__(self, index: int, metrics: dict[str, float] | None = None): method __str__ (line 33) | def __str__(self): class BenchmarkedModel (line 37) | class BenchmarkedModel: method __init__ (line 41) | def __init__( method __str__ (line 49) | def __str__(self): FILE: src/art/utils/output_dirs.py function get_default_art_path (line 7) | def get_default_art_path() -> str: function get_models_dir (line 12) | def get_models_dir(project_name: str, art_path: str | None = None) -> str: function get_model_dir (line 18) | def get_model_dir(model: Model, art_path: str | None = None) -> str: function get_output_dir_from_model_properties (line 24) | def get_output_dir_from_model_properties( function get_step_checkpoint_dir (line 32) | def get_step_checkpoint_dir(model_output_dir: str, step: int) -> str: function get_trajectories_dir (line 36) | def get_trajectories_dir(model_output_dir: str) -> str: function get_trajectories_split_dir (line 40) | def get_trajectories_split_dir(model_output_dir: str, split: str) -> str: FILE: src/art/utils/record_provenance.py function record_provenance (line 9) | def record_provenance(run: wandb.Run, provenance: str) -> None: FILE: src/art/utils/retry.py function retry (line 19) | def retry( FILE: src/art/utils/s3.py class S3SyncError (line 23) | class S3SyncError(RuntimeError): function build_s3_path (line 27) | def build_s3_path( function build_s3_zipped_step_path (line 47) | def build_s3_zipped_step_path( function s3_sync (line 66) | async def s3_sync( function ensure_bucket_exists (line 127) | async def ensure_bucket_exists( function pull_model_from_s3 (line 161) | async def pull_model_from_s3( function push_model_to_s3 (line 223) | async def push_model_to_s3( function archive_and_presign_step_url (line 266) | async def archive_and_presign_step_url( FILE: src/art/utils/s3_checkpoint_utils.py function get_latest_checkpoint_step_from_s3 (line 7) | async def get_latest_checkpoint_step_from_s3( function get_checkpoint_step_not_after_from_s3 (line 54) | async def get_checkpoint_step_not_after_from_s3( function migrate_s3_checkpoints_to_new_structure (line 107) | async def migrate_s3_checkpoints_to_new_structure( FILE: src/art/utils/sft.py class SFTChunk (line 16) | class SFTChunk(NamedTuple): function _parse_jsonl_line (line 24) | def _parse_jsonl_line(line: str) -> "Trajectory": function get_file_row_count (line 42) | def get_file_row_count(file_path: str) -> int: function create_lr_schedule (line 70) | def create_lr_schedule( function create_sft_dataset_iterator (line 135) | def create_sft_dataset_iterator( function iterate_file (line 265) | def iterate_file( function train_sft_from_file (line 332) | async def train_sft_from_file( FILE: src/art/utils/strip_logprobs.py function strip_logprobs (line 9) | def strip_logprobs(obj: Any) -> Any: function _strip_logprobs (line 35) | def _strip_logprobs(obj: Any) -> Any: FILE: src/art/utils/suppress_litellm_serialization_warnings.py function suppress_litellm_serialization_warnings (line 4) | def suppress_litellm_serialization_warnings(): FILE: src/art/utils/trajectory_logging.py function _flatten_message (line 21) | def _flatten_message(msg: dict) -> dict: function _unflatten_message (line 46) | def _unflatten_message(msg_dict: dict) -> dict: function write_trajectory_groups_parquet (line 59) | def write_trajectory_groups_parquet( function read_trajectory_groups_parquet (line 153) | def read_trajectory_groups_parquet(path: str | Path) -> list[TrajectoryG... FILE: src/art/utils/trajectory_migration.py function serialize_trajectory_groups (line 28) | def serialize_trajectory_groups(trajectory_groups: list[TrajectoryGroup]... function trajectory_group_to_dict (line 37) | def trajectory_group_to_dict(trajectory_group: TrajectoryGroup) -> dict[... function history_to_dict (line 50) | def history_to_dict(history: History) -> dict[str, Any]: function trajectory_to_dict (line 58) | def trajectory_to_dict(trajectory: Trajectory) -> dict[str, Any]: function message_or_choice_to_dict (line 79) | def message_or_choice_to_dict(message_or_choice: MessageOrChoice) -> dic... function deserialize_trajectory_groups (line 97) | def deserialize_trajectory_groups(serialized: str) -> list[TrajectoryGro... function dict_to_trajectory_group (line 110) | def dict_to_trajectory_group(d: dict[str, Any]) -> TrajectoryGroup: function dict_to_trajectory (line 119) | def dict_to_trajectory(d: dict[str, Any]) -> Trajectory: function dict_to_message_or_choice (line 132) | def dict_to_message_or_choice(d: dict[str, Any]) -> MessageOrChoice: class MigrationResult (line 145) | class MigrationResult: method compression_ratio (line 155) | def compression_ratio(self) -> float: method space_saved (line 162) | def space_saved(self) -> int: method __add__ (line 166) | def __add__(self, other: "MigrationResult") -> "MigrationResult": function migrate_jsonl_to_parquet (line 177) | def migrate_jsonl_to_parquet( function migrate_trajectories_dir (line 335) | def migrate_trajectories_dir( function migrate_model_dir (line 377) | def migrate_model_dir( function migrate_all_models (line 409) | def migrate_all_models( function auto_migrate_on_register (line 454) | def auto_migrate_on_register(model_dir: Path | str) -> MigrationResult: FILE: src/art/vllm/dedicated_server.py function parse_args (line 16) | def parse_args(argv: list[str] | None = None) -> argparse.Namespace: function main (line 35) | def main(argv: list[str] | None = None) -> None: FILE: src/art/vllm/engine.py function get_llm (line 17) | async def get_llm(args: vllm.AsyncEngineArgs) -> AsyncLLM: # ty:ignore[... function run_on_workers (line 48) | async def run_on_workers( function get_worker (line 72) | def get_worker() -> "ExtendedWorker": class WorkerExtension (line 77) | class WorkerExtension: method run (line 80) | def run(self, pickled_func: bytes, *args: Any, **kwargs: Any) -> Any: method time (line 89) | def time(self, name: str) -> Generator[None, None, None]: class ExtendedWorker (line 98) | class ExtendedWorker(Worker, WorkerExtension): FILE: src/art/vllm/patches.py function subclass_chat_completion_request (line 6) | def subclass_chat_completion_request() -> None: function patch_listen_for_disconnect (line 22) | def patch_listen_for_disconnect() -> None: function patch_tool_parser_manager (line 38) | def patch_tool_parser_manager() -> None: FILE: src/art/vllm/server.py function openai_server_task (line 22) | async def openai_server_task( function _openai_server_coroutine (line 134) | def _openai_server_coroutine( function get_uvicorn_logging_config (line 163) | def get_uvicorn_logging_config(path: str) -> dict[str, Any]: function set_vllm_log_file (line 184) | def set_vllm_log_file(path: str) -> None: FILE: src/art/yield_trajectory.py function yield_trajectory (line 7) | def yield_trajectory(trajectory: Trajectory) -> None: function capture_yielded_trajectory (line 11) | async def capture_yielded_trajectory(coroutine: Coroutine[Any, Any, Any]... class YieldTrajectoryContext (line 20) | class YieldTrajectoryContext: method __init__ (line 21) | def __init__(self) -> None: method __enter__ (line 24) | def __enter__(self) -> None: method __exit__ (line 27) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> N... FILE: src/mp_actors/move.py function _close_all_live_proxies (line 35) | def _close_all_live_proxies() -> None: function _register_proxy_for_atexit (line 46) | def _register_proxy_for_atexit(proxy: "Proxy") -> None: function move_to_child_process (line 54) | def move_to_child_process( function close_proxy (line 77) | def close_proxy(proxy: object) -> None: class Request (line 89) | class Request: class Response (line 98) | class Response: class Proxy (line 104) | class Proxy: method __init__ (line 105) | def __init__( method _process_error (line 129) | def _process_error(self) -> RuntimeError: method _fail_pending (line 140) | def _fail_pending(self, error: Exception) -> None: method _dispatch_responses (line 151) | def _dispatch_responses(self) -> None: method __getattr__ (line 179) | def __getattr__(self, name: str) -> Any: method close (line 252) | def close(self): function _target (line 275) | def _target( function _handle_requests (line 290) | async def _handle_requests( function _handle_request (line 303) | async def _handle_request( FILE: src/mp_actors/traceback.py function streamline_tracebacks (line 10) | def streamline_tracebacks() -> Callable[[T], T]: function streamlined_traceback (line 33) | def streamlined_traceback() -> TracebackType | None: function get_child_traceback (line 41) | def get_child_traceback( FILE: tests/integration.py function make_patch_source (line 46) | def make_patch_source() -> str: function make_variable_override_source (line 68) | def make_variable_override_source(variables: Dict[str, Any]) -> str: function _override_variables_in_notebook (line 82) | def _override_variables_in_notebook(nb, variables: Dict[str, Any]) -> li... class _NotebookPlugin (line 167) | class _NotebookPlugin: method __init__ (line 168) | def __init__(self, notebook_configs: list[dict]) -> None: method pytest_generate_tests (line 171) | def pytest_generate_tests(self, metafunc) -> None: function test_notebook_execution (line 176) | def test_notebook_execution(notebook_config: dict) -> None: function parse_indexes (line 231) | def parse_indexes(indexes_str: str, max_index: int) -> list[int]: function main (line 286) | def main() -> int: FILE: tests/integration/test_live_api_cost.py function _require_live_test_env (line 17) | def _require_live_test_env(*required_vars: str) -> None: function _post_json (line 25) | def _post_json(url: str, *, headers: dict[str, str], payload: dict) -> d... function _cacheable_prefix (line 36) | def _cacheable_prefix(word_count: int = 1500) -> str: function _history_rows (line 40) | def _history_rows(history_path: Path) -> list[dict]: function _openai_completion (line 44) | def _openai_completion(*, api_key: str, prompt_cache_key: str, prefix: s... function _anthropic_message (line 64) | def _anthropic_message(*, api_key: str, prefix: str) -> dict: class TestLiveApiCost (line 90) | class TestLiveApiCost: method test_openai_gpt_4_1_cached_prompt_cost (line 92) | async def test_openai_gpt_4_1_cached_prompt_cost(self, tmp_path: Path)... method test_anthropic_claude_sonnet_4_6_prompt_cache_cost (line 156) | async def test_anthropic_claude_sonnet_4_6_prompt_cache_cost( FILE: tests/integration/test_multi_checkpoint_training.py function get_base_model (line 33) | def get_base_model() -> str: function simple_rollout (line 38) | async def simple_rollout( function run_training_loop (line 63) | async def run_training_loop( function _run_inference_on_step (line 98) | async def _run_inference_on_step( function test_tinker_backend (line 116) | async def test_tinker_backend(): function test_local_backend (line 145) | async def test_local_backend(): function test_serverless_backend (line 175) | async def test_serverless_backend(): FILE: tests/integration/test_pipeline_localbackend_dedicated.py function get_base_model (line 24) | def get_base_model() -> str: function get_safe_gpu_memory_utilization (line 28) | def get_safe_gpu_memory_utilization() -> float: function get_dedicated_vllm_test_config (line 49) | def get_dedicated_vllm_test_config() -> art.dev.InternalModelConfig: function reward_for_answer (line 69) | def reward_for_answer(text: str) -> float: function assert_chat_logprobs (line 80) | async def assert_chat_logprobs( function test_pipeline_trainer_local_backend_dedicated_smoke (line 99) | async def test_pipeline_trainer_local_backend_dedicated_smoke() -> None: FILE: tests/integration/test_provenance.py function simple_rollout (line 15) | async def simple_rollout(model: art.TrainableModel) -> art.Trajectory: function get_latest_artifact_provenance (line 40) | def get_latest_artifact_provenance( function main (line 49) | async def main() -> None: FILE: tests/integration/test_push_and_fork.py function simple_rollout (line 31) | async def simple_rollout( function train_one_step (line 49) | async def train_one_step( function test_push_to_s3 (line 82) | async def test_push_to_s3(): function test_fork_checkpoint_from_wandb (line 120) | async def test_fork_checkpoint_from_wandb(): function test_push_then_fork_from_s3 (line 200) | async def test_push_then_fork_from_s3(): FILE: tests/integration/test_tinker_native_backend.py function get_base_model (line 16) | def get_base_model() -> str: function ensure_reward_variance (line 20) | def ensure_reward_variance(groups) -> None: function simple_rollout (line 30) | async def simple_rollout( function test_tinker_native_backend (line 58) | async def test_tinker_native_backend(): function test_tinker_native_fork_checkpoint (line 122) | async def test_tinker_native_fork_checkpoint(): FILE: tests/integration/test_vllm_contract.py function get_base_model (line 23) | def get_base_model() -> str: function get_safe_gpu_memory_utilization (line 27) | def get_safe_gpu_memory_utilization() -> float: function get_vllm_test_config (line 45) | def get_vllm_test_config() -> art.dev.InternalModelConfig: function simple_rollout (line 63) | async def simple_rollout( function assert_chat_logprobs (line 89) | async def assert_chat_logprobs( function test_local_backend_vllm_contract (line 108) | async def test_local_backend_vllm_contract() -> None: FILE: tests/test_backend_train_api.py function get_vllm_test_config (line 23) | def get_vllm_test_config() -> tuple[art.dev.InternalModelConfig, str | N... function simple_rollout (line 65) | async def simple_rollout(client, model_name: str, prompt: str) -> art.Tr... function main (line 88) | async def main(): FILE: tests/unit/test_auto_trajectory.py function test_server (line 189) | async def test_server(): function test_auto_trajectory (line 212) | async def test_auto_trajectory(test_server: None) -> None: function test_litellm_auto_trajectory (line 324) | async def test_litellm_auto_trajectory(test_server: None) -> None: FILE: tests/unit/test_benchmarking_loader.py function test_load_trajectories_group_columns (line 9) | async def test_load_trajectories_group_columns(tmp_path): FILE: tests/unit/test_dedicated_config.py function test_shared_mode_empty_config (line 11) | def test_shared_mode_empty_config(): function test_shared_mode_with_other_keys (line 16) | def test_shared_mode_with_other_keys(): function test_dedicated_mode_detected (line 21) | def test_dedicated_mode_detected(): function test_valid_shared_mode (line 26) | def test_valid_shared_mode(): function test_valid_dedicated_two_gpus (line 30) | def test_valid_dedicated_two_gpus(): function test_valid_dedicated_three_gpus (line 36) | def test_valid_dedicated_three_gpus(): function test_valid_dedicated_four_gpus (line 42) | def test_valid_dedicated_four_gpus(): function test_only_trainer_gpu_ids (line 48) | def test_only_trainer_gpu_ids(): function test_only_inference_gpu_ids (line 53) | def test_only_inference_gpu_ids(): function test_empty_trainer_gpu_ids (line 58) | def test_empty_trainer_gpu_ids(): function test_empty_inference_gpu_ids (line 65) | def test_empty_inference_gpu_ids(): function test_overlapping_gpu_ids (line 72) | def test_overlapping_gpu_ids(): function test_multi_gpu_inference (line 79) | def test_multi_gpu_inference(): function test_trainer_not_starting_at_zero (line 86) | def test_trainer_not_starting_at_zero(): function test_trainer_not_contiguous (line 93) | def test_trainer_not_contiguous(): function test_dedicated_rejects_fast_inference (line 100) | def test_dedicated_rejects_fast_inference(): function test_dedicated_rejects_enable_sleep_mode (line 113) | def test_dedicated_rejects_enable_sleep_mode(): function test_dedicated_allows_fast_inference_false (line 126) | def test_dedicated_allows_fast_inference_false(): function test_get_model_config_shared_mode (line 137) | def test_get_model_config_shared_mode(): function test_get_model_config_dedicated_mode (line 148) | def test_get_model_config_dedicated_mode(): function test_get_model_config_dedicated_preserves_user_engine_args (line 163) | def test_get_model_config_dedicated_preserves_user_engine_args(): FILE: tests/unit/test_dedicated_server.py function test_parse_args_required (line 11) | def test_parse_args_required(): function test_parse_args_with_engine_args (line 36) | def test_parse_args_with_engine_args(): function test_parse_args_custom_host (line 56) | def test_parse_args_custom_host(): function test_parse_args_with_server_args (line 76) | def test_parse_args_with_server_args(): FILE: tests/unit/test_frontend_logging.py class TestFrontendLoggingCompatibility (line 25) | class TestFrontendLoggingCompatibility: method sample_trajectories (line 29) | def sample_trajectories(self) -> list[Trajectory]: method sample_trajectory_groups (line 56) | def sample_trajectory_groups( method test_parquet_readable_by_read_trajectory_groups_parquet (line 72) | async def test_parquet_readable_by_read_trajectory_groups_parquet( method test_parquet_schema_preserved (line 98) | async def test_parquet_schema_preserved( class TestHistoryJsonlCompatibility (line 135) | class TestHistoryJsonlCompatibility: method sample_trajectory_groups (line 139) | def sample_trajectory_groups(self) -> list[TrajectoryGroup]: method test_history_jsonl_format (line 166) | async def test_history_jsonl_format( method test_history_readable_by_polars (line 191) | async def test_history_readable_by_polars( method test_history_appends_entries (line 212) | async def test_history_appends_entries( class TestPathStructure (line 238) | class TestPathStructure: method test_file_locations_match_localbackend (line 242) | async def test_file_locations_match_localbackend(self, tmp_path: Path): method test_step_numbering_format (line 272) | async def test_step_numbering_format(self, tmp_path: Path): class TestMetricCalculation (line 308) | class TestMetricCalculation: method test_metric_prefixes (line 312) | async def test_metric_prefixes(self, tmp_path: Path): method test_standard_metrics_present (line 359) | async def test_standard_metrics_present(self, tmp_path: Path): method test_group_metric_aggregation (line 398) | async def test_group_metric_aggregation(self, tmp_path: Path): method test_exception_rate_calculation (line 439) | async def test_exception_rate_calculation(self, tmp_path: Path): method test_exception_rate_counts_group_exceptions (line 472) | async def test_exception_rate_counts_group_exceptions(self, tmp_path: ... method test_generator_of_trajectories_is_consumed_once (line 501) | async def test_generator_of_trajectories_is_consumed_once(self, tmp_pa... method test_train_trajectory_metrics_default_to_train_prefix (line 531) | async def test_train_trajectory_metrics_default_to_train_prefix( method test_train_logs_add_default_data_metrics_from_trajectory_groups (line 569) | async def test_train_logs_add_default_data_metrics_from_trajectory_gro... method test_costs_are_logged_in_hierarchical_taxonomy (line 625) | async def test_costs_are_logged_in_hierarchical_taxonomy(self, tmp_pat... method test_cost_cumulative_persists_across_model_recreation (line 668) | async def test_cost_cumulative_persists_across_model_recreation( method test_metrics_builder_loads_resume_state_before_builder_use (line 707) | async def test_metrics_builder_loads_resume_state_before_builder_use( method test_direct_time_and_data_metrics_get_cumulative_variants (line 737) | async def test_direct_time_and_data_metrics_get_cumulative_variants( method test_log_without_new_builder_metrics_skips_extra_taxonomy_row (line 767) | async def test_log_without_new_builder_metrics_skips_extra_taxonomy_row( class TestWandbIntegration (line 805) | class TestWandbIntegration: method test_wandb_not_called_without_api_key (line 809) | async def test_wandb_not_called_without_api_key(self, tmp_path: Path): method test_should_log_wandb_logic_default (line 830) | def test_should_log_wandb_logic_default(self, tmp_path: Path): method test_should_log_wandb_logic_with_key (line 852) | def test_should_log_wandb_logic_with_key(self, tmp_path: Path): method test_should_log_wandb_logic_explicit_wandb (line 868) | def test_should_log_wandb_logic_explicit_wandb(self, tmp_path: Path): method test_should_log_wandb_logic_empty_list (line 883) | def test_should_log_wandb_logic_empty_list(self, tmp_path: Path): class TestLocalBackendAutomaticMetrics (line 900) | class TestLocalBackendAutomaticMetrics: method test_train_logs_automatic_wall_time_and_gpu_cost (line 902) | async def test_train_logs_automatic_wall_time_and_gpu_cost( method test_unknown_local_gpu_skips_cost_but_keeps_wall_time (line 952) | async def test_unknown_local_gpu_skips_cost_but_keeps_wall_time( class TestModelAttributes (line 989) | class TestModelAttributes: method test_base_path_default (line 992) | def test_base_path_default(self): method test_base_path_custom (line 997) | def test_base_path_custom(self): method test_report_metrics_default (line 1002) | def test_report_metrics_default(self): method test_report_metrics_custom (line 1007) | def test_report_metrics_custom(self): class TestTrainSFTMetricsAggregation (line 1013) | class TestTrainSFTMetricsAggregation: method test_train_sft_aggregates_metrics (line 1017) | async def test_train_sft_aggregates_metrics(self, tmp_path: Path): method test_train_sft_single_step_increment (line 1087) | async def test_train_sft_single_step_increment(self, tmp_path: Path): method test_train_sft_no_metrics_when_empty (line 1125) | async def test_train_sft_no_metrics_when_empty(self, tmp_path: Path): class TestGradientStepMetrics (line 1155) | class TestGradientStepMetrics: method test_model_train_logs_gradient_step_count (line 1157) | async def test_model_train_logs_gradient_step_count(self, tmp_path: Pa... method test_local_backend_train_returns_gradient_step_count (line 1203) | async def test_local_backend_train_returns_gradient_step_count( FILE: tests/unit/test_metric_routing.py class TestMetricRoutingBaseline (line 12) | class TestMetricRoutingBaseline: method test_log_metrics_routes_known_sections_without_split_prefix (line 13) | def test_log_metrics_routes_known_sections_without_split_prefix( method test_get_wandb_run_registers_taxonomy_sections (line 43) | def test_get_wandb_run_registers_taxonomy_sections(self, tmp_path: Pat... method test_log_metrics_defines_nested_cost_keys_with_training_step (line 80) | def test_log_metrics_defines_nested_cost_keys_with_training_step( method test_update_wandb_config_seeds_wandb_init (line 128) | def test_update_wandb_config_seeds_wandb_init(self, tmp_path: Path) ->... method test_update_wandb_config_updates_active_run (line 159) | def test_update_wandb_config_updates_active_run(self, tmp_path: Path) ... method test_update_wandb_config_rejects_conflicting_values (line 198) | def test_update_wandb_config_rejects_conflicting_values( FILE: tests/unit/test_metrics_builder.py class TestMetricsBuilder (line 8) | class TestMetricsBuilder: method test_rollup_correctness_across_depths (line 10) | async def test_rollup_correctness_across_depths(self) -> None: method test_cum_accumulates_for_hierarchical_sections (line 29) | async def test_cum_accumulates_for_hierarchical_sections(self) -> None: method test_helper_metrics_accumulate_within_a_single_step (line 61) | async def test_helper_metrics_accumulate_within_a_single_step(self) ->... method test_throughput_metrics_derive_from_time_and_token_cumulatives (line 82) | async def test_throughput_metrics_derive_from_time_and_token_cumulatives( method test_costs_all_generated_for_single_and_multiple_children (line 101) | async def test_costs_all_generated_for_single_and_multiple_children(se... method test_leaf_parent_conflicts_raise (line 113) | def test_leaf_parent_conflicts_raise(self) -> None: method test_duplicate_leaf_writes_are_summed (line 125) | async def test_duplicate_leaf_writes_are_summed(self) -> None: method test_cumulative_namespace_is_reserved (line 136) | def test_cumulative_namespace_is_reserved(self) -> None: method test_sparse_steps_omit_rollup_for_missing_costs (line 142) | async def test_sparse_steps_omit_rollup_for_missing_costs(self) -> None: method test_state_dict_round_trip_preserves_cumulative_state (line 157) | async def test_state_dict_round_trip_preserves_cumulative_state(self) ... method test_loaded_state_is_shared_with_other_cost_contexts (line 172) | async def test_loaded_state_is_shared_with_other_cost_contexts(self) -... method test_add_response_cost_uses_registered_model_pricing (line 188) | async def test_add_response_cost_uses_registered_model_pricing(self) -... method test_unique_scenario_count_tracks_exact_ids (line 211) | async def test_unique_scenario_count_tracks_exact_ids(self) -> None: method test_empty_flush_does_not_repeat_stale_derived_metrics (line 222) | async def test_empty_flush_does_not_repeat_stale_derived_metrics(self)... method test_concurrent_add_cost_calls_do_not_lose_updates (line 236) | async def test_concurrent_add_cost_calls_do_not_lose_updates(self) -> ... method test_contextvar_activate_and_get_active (line 250) | def test_contextvar_activate_and_get_active(self) -> None: FILE: tests/unit/test_metrics_taxonomy.py function test_average_metric_samples_handles_sparse_keys (line 13) | def test_average_metric_samples_handles_sparse_keys() -> None: function test_build_training_summary_metrics_only_includes_data_section (line 26) | def test_build_training_summary_metrics_only_includes_data_section() -> ... function test_average_metric_samples_requires_invariant_gradient_step_count (line 46) | def test_average_metric_samples_requires_invariant_gradient_step_count()... function test_summarize_trajectory_groups_only_counts_explicit_scenario_id (line 56) | def test_summarize_trajectory_groups_only_counts_explicit_scenario_id() ... FILE: tests/unit/test_model_openai_client_costs.py class _FakeUsage (line 10) | class _FakeUsage: method __init__ (line 11) | def __init__(self, prompt_tokens: int, completion_tokens: int) -> None: class _FakeResponse (line 16) | class _FakeResponse: method __init__ (line 17) | def __init__( class _FakeCompletions (line 28) | class _FakeCompletions: method __init__ (line 29) | def __init__(self, response: _FakeResponse) -> None: method create (line 32) | async def create(self, *args: Any, **kwargs: Any) -> _FakeResponse: function _patch_async_openai (line 36) | def _patch_async_openai( function _build_model (line 55) | def _build_model() -> TrainableModel: class TestModelOpenAIClientCosts (line 70) | class TestModelOpenAIClientCosts: method test_openai_client_automatically_logs_train_tinker_costs (line 72) | async def test_openai_client_automatically_logs_train_tinker_costs( method test_openai_client_automatically_logs_eval_tinker_costs (line 92) | async def test_openai_client_automatically_logs_eval_tinker_costs( method test_openai_client_does_not_log_costs_without_active_metrics_context (line 112) | async def test_openai_client_does_not_log_costs_without_active_metrics... method test_multiple_choices_scale_prefill_cost_once_per_sample (line 129) | async def test_multiple_choices_scale_prefill_cost_once_per_sample( method test_manual_cost_calculator_still_returns_tinker_metrics (line 148) | def test_manual_cost_calculator_still_returns_tinker_metrics(self) -> ... FILE: tests/unit/test_mp_actors.py class DemoService (line 12) | class DemoService: method __init__ (line 13) | def __init__(self) -> None: method increment (line 16) | def increment(self) -> int: method aincrement (line 20) | async def aincrement(self) -> int: method ping (line 25) | async def ping(self) -> str: method ticker (line 29) | async def ticker(self, n: int = 1_000): method slow (line 34) | async def slow(self, delay: float = 5.0) -> str: method raise_error (line 38) | async def raise_error(self, message: str) -> None: class ExitService (line 43) | class ExitService: method child_exit (line 44) | async def child_exit(self) -> None: method ping (line 48) | async def ping(self) -> str: function _wait_for_count (line 53) | async def _wait_for_count(values: list[int], target: int, timeout: float... function test_proxy_supports_sync_async_and_attribute_access (line 61) | async def test_proxy_supports_sync_async_and_attribute_access() -> None: function test_child_exit_error_is_sticky_for_followup_calls (line 74) | async def test_child_exit_error_is_sticky_for_followup_calls() -> None: function test_async_generator_cancellation_does_not_break_future_calls (line 89) | async def test_async_generator_cancellation_does_not_break_future_calls(... function test_close_fails_inflight_requests_and_is_idempotent (line 111) | async def test_close_fails_inflight_requests_and_is_idempotent() -> None: function test_child_exceptions_are_propagated_and_proxy_recovers (line 131) | async def test_child_exceptions_are_propagated_and_proxy_recovers() -> N... FILE: tests/unit/test_multi_checkpoint_inference.py class TestModelGetInferenceName (line 27) | class TestModelGetInferenceName: method test_get_inference_name_without_step_uses_name (line 30) | def test_get_inference_name_without_step_uses_name(self): method test_get_inference_name_without_step_uses_inference_model_name (line 35) | def test_get_inference_name_without_step_uses_inference_model_name(self): method test_get_inference_name_with_step_appends_suffix (line 44) | def test_get_inference_name_with_step_appends_suffix(self): method test_get_inference_name_with_step_uses_inference_model_name (line 51) | def test_get_inference_name_with_step_uses_inference_model_name(self): method test_get_inference_name_none_step_is_same_as_no_step (line 60) | def test_get_inference_name_none_step_is_same_as_no_step(self): class TestTrainableModelGetInferenceName (line 66) | class TestTrainableModelGetInferenceName: method test_trainable_model_get_inference_name_with_step (line 69) | def test_trainable_model_get_inference_name_with_step(self): class TestLitellmCompletionParams (line 80) | class TestLitellmCompletionParams: method test_litellm_completion_params_without_step (line 83) | def test_litellm_completion_params_without_step(self): method test_litellm_completion_params_with_step (line 97) | def test_litellm_completion_params_with_step(self): method test_litellm_completion_params_trainable_model_with_step (line 109) | def test_litellm_completion_params_trainable_model_with_step(self): class TestServerlessBackendModelInferenceName (line 133) | class TestServerlessBackendModelInferenceName: method test_model_inference_name_without_step (line 136) | def test_model_inference_name_without_step(self): method test_model_inference_name_with_step (line 154) | def test_model_inference_name_with_step(self): method test_model_inference_name_none_step_is_same_as_no_step (line 174) | def test_model_inference_name_none_step_is_same_as_no_step(self): class TestOpenAIServerConfigLoraName (line 198) | class TestOpenAIServerConfigLoraName: method test_lora_name_includes_step (line 201) | def test_lora_name_includes_step(self): method test_lora_name_step_zero (line 217) | def test_lora_name_step_zero(self): method test_served_model_name_uses_base_model_when_lora_enabled (line 232) | def test_served_model_name_uses_base_model_when_lora_enabled(self): class TestStepParsing (line 254) | class TestStepParsing: method tinker_native_backend_class (line 258) | def tinker_native_backend_class(self): method test_parse_step_from_model_name (line 267) | def test_parse_step_from_model_name(self, tinker_native_backend_class): method test_missing_step_suffix_fails_loudly (line 274) | def test_missing_step_suffix_fails_loudly(self, tinker_native_backend_... method test_invalid_step_suffix_fails_loudly (line 282) | def test_invalid_step_suffix_fails_loudly(self, tinker_native_backend_... class TestUnslothServiceMaxLoras (line 296) | class TestUnslothServiceMaxLoras: method unsloth_service_class (line 300) | def unsloth_service_class(self): method test_max_loras_default_is_2 (line 309) | def test_max_loras_default_is_2(self, unsloth_service_class): method test_max_loras_can_be_overridden (line 331) | def test_max_loras_can_be_overridden(self, unsloth_service_class): class TestPipelinedTrainingUsage (line 356) | class TestPipelinedTrainingUsage: method test_pipelined_training_pattern (line 359) | def test_pipelined_training_pattern(self): FILE: tests/unit/test_pipeline_trainer_batching.py function _make_group (line 11) | def _make_group() -> TrajectoryGroup: function test_collect_batch_respects_max_batch_size (line 28) | async def test_collect_batch_respects_max_batch_size(tmp_path: Path) -> ... FILE: tests/unit/test_pipeline_trainer_local_backend.py function _make_group (line 16) | def _make_group(rewards: list[float]) -> TrajectoryGroup: function _make_trainer (line 32) | def _make_trainer( function test_pipeline_trainer_preserves_backend_train_kwargs (line 54) | async def test_pipeline_trainer_preserves_backend_train_kwargs(tmp_path:... function test_pipeline_trainer_uses_same_train_kwargs_for_local_backend (line 92) | async def test_pipeline_trainer_uses_same_train_kwargs_for_local_backend( function test_local_backend_train_translates_loss_fn (line 131) | async def test_local_backend_train_translates_loss_fn(tmp_path: Path) ->... function test_local_backend_async_context_manager_awaits_async_cleanup (line 169) | async def test_local_backend_async_context_manager_awaits_async_cleanup( function test_pipeline_trainer_rejects_unsupported_local_backend_settings (line 199) | def test_pipeline_trainer_rejects_unsupported_local_backend_settings( function test_pipeline_trainer_rejects_shared_local_backend (line 223) | def test_pipeline_trainer_rejects_shared_local_backend(tmp_path: Path) -... function test_local_backend_inference_name_prefers_served_step_in_dedicated_mode (line 237) | def test_local_backend_inference_name_prefers_served_step_in_dedicated_m... FILE: tests/unit/test_pipeline_trainer_metrics.py function _make_group (line 13) | def _make_group( function test_pipeline_trainer_logs_explicit_stale_and_zero_variance_metrics (line 32) | async def test_pipeline_trainer_logs_explicit_stale_and_zero_variance_me... FILE: tests/unit/test_prefix_cache.py class TestLRUTrieCache (line 10) | class TestLRUTrieCache: method test_longest_prefix_match (line 11) | def test_longest_prefix_match(self) -> None: method test_lru_eviction (line 22) | def test_lru_eviction(self) -> None: method test_invalid_size (line 34) | def test_invalid_size(self) -> None: FILE: tests/unit/test_ruler_metrics.py class _FakePromptTokenDetails (line 11) | class _FakePromptTokenDetails: method __init__ (line 12) | def __init__(self, *, cached_tokens: int = 0) -> None: class _FakeUsage (line 16) | class _FakeUsage: method __init__ (line 17) | def __init__( class _FakeMessage (line 35) | class _FakeMessage: method __init__ (line 36) | def __init__(self, content: str) -> None: class _FakeChoice (line 40) | class _FakeChoice: method __init__ (line 41) | def __init__(self, content: str) -> None: class _FakeResponse (line 45) | class _FakeResponse: method __init__ (line 46) | def __init__( function test_ruler_records_builder_cost_for_supported_judges (line 65) | async def test_ruler_records_builder_cost_for_supported_judges(monkeypat... function test_ruler_skips_cost_when_pricing_is_unavailable (line 107) | async def test_ruler_skips_cost_when_pricing_is_unavailable(monkeypatch): function test_ruler_records_direct_cost_for_openrouter_judges (line 145) | async def test_ruler_records_direct_cost_for_openrouter_judges(monkeypat... FILE: tests/unit/test_sft.py function create_temp_jsonl (line 17) | def create_temp_jsonl(num_trajectories: int) -> Path: function test_iterate_file (line 32) | def test_iterate_file(): function test_iterate_file_multiple_epochs (line 45) | def test_iterate_file_multiple_epochs(): function test_iterate_file_with_initial_skip (line 59) | def test_iterate_file_with_initial_skip(): function test_iterate_file_deterministic (line 73) | def test_iterate_file_deterministic(): function test_lr_schedule_warmup_not_zero (line 89) | def test_lr_schedule_warmup_not_zero(): function test_lr_schedule_edge_cases (line 107) | def test_lr_schedule_edge_cases(): function test_lr_schedule_decay_methods (line 125) | def test_lr_schedule_decay_methods(): function test_lr_schedule_no_warmup (line 148) | def test_lr_schedule_no_warmup(): function _make_trajectories (line 158) | def _make_trajectories(n: int): function test_create_sft_dataset_iterator_lr_schedule_continuity (line 173) | def test_create_sft_dataset_iterator_lr_schedule_continuity(): function test_create_sft_dataset_iterator_step_tracking (line 212) | def test_create_sft_dataset_iterator_step_tracking(): function test_create_sft_dataset_iterator_initial_step (line 246) | def test_create_sft_dataset_iterator_initial_step(): function test_create_sft_dataset_iterator_deterministic (line 279) | def test_create_sft_dataset_iterator_deterministic(): function test_create_sft_dataset_iterator_empty_input (line 302) | def test_create_sft_dataset_iterator_empty_input(): function test_create_sft_dataset_iterator_single_chunk (line 308) | def test_create_sft_dataset_iterator_single_chunk(): FILE: tests/unit/test_strip_logprobs.py class TestStripLogprobs (line 12) | class TestStripLogprobs: method test_strip_dict_with_logprobs (line 15) | def test_strip_dict_with_logprobs(self): method test_strip_nested_dict (line 29) | def test_strip_nested_dict(self): method test_strip_list_with_logprobs (line 46) | def test_strip_list_with_logprobs(self): method test_strip_tuple_with_logprobs (line 59) | def test_strip_tuple_with_logprobs(self): method test_strip_object_with_logprobs (line 73) | def test_strip_object_with_logprobs(self): method test_strip_mixed_nested_structure (line 89) | def test_strip_mixed_nested_structure(self): method test_strip_empty_structures (line 109) | def test_strip_empty_structures(self): method test_strip_none_and_primitives (line 115) | def test_strip_none_and_primitives(self): method test_no_logprobs_unchanged (line 123) | def test_no_logprobs_unchanged(self): method test_deepcopy_behavior (line 135) | def test_deepcopy_behavior(self): method test_deepcopy_failure_returns_original (line 149) | def test_deepcopy_failure_returns_original(self, caplog): method test_deepcopy_failure_with_recursion_error (line 175) | def test_deepcopy_failure_with_recursion_error(self, caplog): FILE: tests/unit/test_tinker_renderers.py class FakeTokenizer (line 10) | class FakeTokenizer: method __init__ (line 15) | def __init__(self) -> None: method encode (line 23) | def encode(self, text: str, add_special_tokens: bool = False) -> list[... method decode (line 47) | def decode(self, tokens: int | list[int]) -> str: function _decode_model_input (line 53) | def _decode_model_input(tokenizer: FakeTokenizer, model_input: object) -... function _get_test_renderer (line 61) | def _get_test_renderer(name: str, tokenizer: FakeTokenizer) -> renderers... function test_get_renderer_name_autodetects_qwen3_5 (line 65) | def test_get_renderer_name_autodetects_qwen3_5() -> None: function test_qwen3_5_generation_prompt_matches_hf_suffixes (line 69) | def test_qwen3_5_generation_prompt_matches_hf_suffixes() -> None: function test_qwen3_5_parse_response_handles_xml_tool_calls (line 92) | def test_qwen3_5_parse_response_handles_xml_tool_calls() -> None: function test_qwen3_5_to_openai_message_uses_mapping_tool_arguments (line 127) | def test_qwen3_5_to_openai_message_uses_mapping_tool_arguments() -> None: function test_convert_openai_messages_to_renderer_format_stringifies_dict_arguments (line 157) | def test_convert_openai_messages_to_renderer_format_stringifies_dict_arg... function test_get_renderer_supports_kimi_k25_factory (line 191) | def test_get_renderer_supports_kimi_k25_factory() -> None: FILE: tests/unit/test_track_api_cost.py class _OpenAIUsage (line 14) | class _OpenAIUsage: method __init__ (line 15) | def __init__( class _OpenAIResponse (line 35) | class _OpenAIResponse: method __init__ (line 36) | def __init__( class _AnthropicUsage (line 56) | class _AnthropicUsage: method __init__ (line 57) | def __init__( class _AnthropicResponse (line 71) | class _AnthropicResponse: method __init__ (line 72) | def __init__( class TestTrackApiCost (line 90) | class TestTrackApiCost: method test_compute_sample_costs_uses_tinker_leaf_names (line 91) | def test_compute_sample_costs_uses_tinker_leaf_names(self) -> None: method test_openai_cost_extraction_with_explicit_pricing (line 108) | async def test_openai_cost_extraction_with_explicit_pricing(self) -> N... method test_openai_cost_extraction_accounts_for_cached_tokens (line 131) | async def test_openai_cost_extraction_accounts_for_cached_tokens(self)... method test_anthropic_cost_extraction_uses_registered_model_pricing (line 159) | async def test_anthropic_cost_extraction_uses_registered_model_pricing( method test_anthropic_cost_extraction_accounts_for_cache_write_and_read (line 187) | async def test_anthropic_cost_extraction_accounts_for_cache_write_and_... method test_direct_usage_cost_is_used_before_provider_estimation (line 222) | async def test_direct_usage_cost_is_used_before_provider_estimation(se... method test_direct_model_extra_cost_is_used_when_usage_cost_missing (line 249) | async def test_direct_model_extra_cost_is_used_when_usage_cost_missing( method test_explicit_model_name_uses_global_pricing (line 278) | async def test_explicit_model_name_uses_global_pricing( method test_explicit_model_name_uses_registered_pricing (line 316) | async def test_explicit_model_name_uses_registered_pricing( method test_explicit_model_name_does_not_depend_on_response_model (line 350) | async def test_explicit_model_name_does_not_depend_on_response_model(s... method test_decorator_fails_fast_without_model_aware_pricing (line 377) | async def test_decorator_fails_fast_without_model_aware_pricing(self) ... method test_custom_extractor_takes_precedence (line 396) | async def test_custom_extractor_takes_precedence(self) -> None: method test_decorator_noops_without_active_builder (line 420) | async def test_decorator_noops_without_active_builder(self) -> None: method test_for_cost_context_routes_to_eval_and_shares_state (line 433) | async def test_for_cost_context_routes_to_eval_and_shares_state(self) ... class TestTrackApiCostIntegration (line 457) | class TestTrackApiCostIntegration: method test_model_log_emits_train_and_eval_costs (line 459) | async def test_model_log_emits_train_and_eval_costs(self, tmp_path: Pa... method test_model_log_keeps_pending_train_and_eval_costs_isolated (line 519) | async def test_model_log_keeps_pending_train_and_eval_costs_isolated( method test_pipeline_trainer_activates_train_context_for_rollouts (line 584) | async def test_pipeline_trainer_activates_train_context_for_rollouts( method test_pipeline_trainer_activates_eval_context_for_eval_fn (line 633) | async def test_pipeline_trainer_activates_eval_context_for_eval_fn( FILE: tests/unit/test_trajectory_copy.py function sample_trajectory (line 13) | def sample_trajectory(): function sample_trajectory_group (line 37) | def sample_trajectory_group(sample_trajectory): function test_shallow_copy (line 62) | def test_shallow_copy(sample_trajectory_group): function test_deep_copy (line 81) | def test_deep_copy(sample_trajectory_group): function test_deep_copy_with_exceptions (line 108) | def test_deep_copy_with_exceptions(): function test_deep_copy_circular_reference (line 132) | def test_deep_copy_circular_reference(): function test_deep_copy_preserves_metadata (line 158) | def test_deep_copy_preserves_metadata(sample_trajectory_group): function test_copy_empty_group (line 183) | def test_copy_empty_group(): FILE: tests/unit/test_trajectory_parquet.py function _ensure_message (line 58) | def _ensure_message(item: MessageOrChoice) -> ChatCompletionMessageParam: function _ensure_assistant_message (line 64) | def _ensure_assistant_message( function _ensure_tool_message (line 72) | def _ensure_tool_message(item: MessageOrChoice) -> ChatCompletionToolMes... function _ensure_user_message (line 78) | def _ensure_user_message(item: MessageOrChoice) -> ChatCompletionUserMes... class TestParquetRoundTrip (line 84) | class TestParquetRoundTrip: method test_simple_trajectory (line 87) | def test_simple_trajectory(self, tmp_path: Path): method test_tool_calls (line 122) | def test_tool_calls(self, tmp_path: Path): method test_group_level_fields_round_trip (line 182) | def test_group_level_fields_round_trip(self, tmp_path: Path): method test_choice_format (line 219) | def test_choice_format(self, tmp_path: Path): method test_unicode_content (line 267) | def test_unicode_content(self, tmp_path: Path): method test_multiple_trajectories (line 302) | def test_multiple_trajectories(self, tmp_path: Path): method test_multiple_groups_preserved (line 336) | def test_multiple_groups_preserved(self, tmp_path: Path): method test_empty_trajectory_group (line 412) | def test_empty_trajectory_group(self, tmp_path: Path): method test_nullable_fields (line 424) | def test_nullable_fields(self, tmp_path: Path): class TestMigration (line 453) | class TestMigration: method test_migrate_simple_jsonl (line 456) | def test_migrate_simple_jsonl(self, tmp_path: Path): method test_migrate_keeps_original_when_requested (line 505) | def test_migrate_keeps_original_when_requested(self, tmp_path: Path): method test_migrate_dry_run (line 515) | def test_migrate_dry_run(self, tmp_path: Path): method test_migrate_directory (line 526) | def test_migrate_directory(self, tmp_path: Path): method test_migrate_model_dir (line 579) | def test_migrate_model_dir(self, tmp_path: Path): method test_migrate_idempotent (line 608) | def test_migrate_idempotent(self, tmp_path: Path): class TestGoldenFiles (line 622) | class TestGoldenFiles: method fixtures_available (line 626) | def fixtures_available(self): method test_real_sample_migration (line 632) | def test_real_sample_migration(self, tmp_path: Path, fixtures_available): method test_fixture_roundtrips (line 666) | def test_fixture_roundtrips(self, tmp_path: Path, fixtures_available): class TestCompression (line 696) | class TestCompression: method test_long_content_compresses_well (line 699) | def test_long_content_compresses_well(self, tmp_path: Path): class TestEdgeCases (line 733) | class TestEdgeCases: method test_nonexistent_file (line 736) | def test_nonexistent_file(self, tmp_path: Path): method test_invalid_json (line 742) | def test_invalid_json(self, tmp_path: Path): method test_empty_file (line 751) | def test_empty_file(self, tmp_path: Path): method test_non_jsonl_file_skipped (line 762) | def test_non_jsonl_file_skipped(self, tmp_path: Path): FILE: tests/unit/test_unsloth_metrics.py class _DummyTrainer (line 7) | class _DummyTrainer: method __init__ (line 8) | def __init__(self) -> None: function test_get_log_fn_routes_eval_metrics_to_val_namespace (line 12) | def test_get_log_fn_routes_eval_metrics_to_val_namespace() -> None: FILE: tests/unit/test_vllm_patches_contract.py function test_subclass_chat_completion_request_forces_logprobs (line 13) | def test_subclass_chat_completion_request_forces_logprobs() -> None: function test_patch_tool_parser_manager_falls_back_to_empty_delta_message (line 32) | def test_patch_tool_parser_manager_falls_back_to_empty_delta_message() -... FILE: tests/unit/test_yield_trajectory.py function test_server (line 111) | async def test_server(): function test_yield_trajectory (line 131) | async def test_yield_trajectory(test_server: None) -> None: