Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/OpenPipe/ART
/ functions
Functions
1,502 in github.com/OpenPipe/ART
⨍
Functions
1,502
◇
Types & classes
261
↳
Endpoints
14
↓ 79 callers
Method
log
Log trajectories and/or metrics. Can be used in two ways: 1. Log trajectories: `await model.log(trajectory_groups, split="tr
src/art/model.py:712
↓ 62 callers
Method
run
(self, pickled_func: bytes, *args: Any, **kwargs: Any)
src/art/vllm/engine.py:80
↓ 55 callers
Method
create
( self, *, entity: str | None = None, project: str | None = None, name
src/art/serverless/client.py:96
↓ 48 callers
Method
get_inference_name
Return the name that should be sent to the inference endpoint. Args: step: If provided, returns name for specific checkpoint.
src/art/model.py:282
↓ 46 callers
Method
encode
(self, text: str, add_special_tokens: bool = False)
tests/unit/test_tinker_renderers.py:23
↓ 41 callers
Method
split
Split the collection into train and validation sets.
src/art/mcp/types.py:142
↓ 38 callers
Method
flush
(self)
src/art/metrics.py:193
↓ 34 callers
Method
register
( self, backend: "Backend", _openai_client_config: dev.OpenAIServerConfig | None = Non
src/art/model.py:997
↓ 31 callers
Method
get_step
Get the model's current training step. For non-trainable models, returns 0.
src/art/model.py:873
↓ 31 callers
Method
openai_client
( self, )
src/art/model.py:233
↓ 28 callers
Method
reset
(self)
src/art/gather.py:237
↓ 27 callers
Method
register
(self, backend: "Backend")
src/art/model.py:221
↓ 25 callers
Method
decode
Decode tokens to string, buffering incomplete UTF-8 sequences. Args: tokens: New tokens to decode. Returns:
src/art/tinker/cookbook_v/renderers/base.py:225
↓ 23 callers
Method
add_cost
(self, path: str, usd: float)
src/art/metrics.py:98
↓ 22 callers
Method
_tinker_train_call
(self, label: str, awaitable: Awaitable[T])
src/art/tinker_native/backend.py:162
↓ 21 callers
Function
get_model_dir
(model: Model, art_path: str | None = None)
src/art/utils/output_dirs.py:18
↓ 21 callers
Method
time
(self, name: str)
src/art/vllm/engine.py:89
↓ 18 callers
Method
activate
(self)
src/art/metrics.py:223
↓ 18 callers
Method
add_metric
(self, key: str, value: float)
src/art/metrics.py:139
↓ 18 callers
Function
get_step_checkpoint_dir
(model_output_dir: str, step: int)
src/art/utils/output_dirs.py:32
↓ 18 callers
Function
ok
(msg)
src/art/utils/logging.py:31
↓ 18 callers
Function
strip_logprobs
Recursively remove 'logprobs' keys from nested data structures to reduce data storage size. Args: obj: Any nested data structure
src/art/utils/strip_logprobs.py:9
↓ 16 callers
Function
dim
(msg)
src/art/utils/logging.py:43
↓ 16 callers
Function
validate_dedicated_config
Validate dedicated mode GPU configuration. Raises ValueError if the configuration is invalid. Does nothing if neither trainer_gpu_ids nor inf
src/art/dev/validate.py:11
↓ 15 callers
Function
step
(msg)
src/art/utils/logging.py:27
↓ 14 callers
Function
info
(msg)
src/art/utils/logging.py:23
↓ 13 callers
Method
_refresh_status
(self, *, force: bool = False)
src/art/pipeline_trainer/status.py:317
↓ 13 callers
Method
add_data
( self, step_num_scenarios: int | None = None, step_actor_tokens: int | None = None,
src/art/metrics.py:144
↓ 13 callers
Function
read_trajectory_groups_parquet
Read trajectory groups from a Parquet file. Args: path: Path to the Parquet file. Returns: List of TrajectoryGroup obje
src/art/utils/trajectory_logging.py:153
↓ 13 callers
Method
train
Train the model on the given trajectory groups. This is the recommended way to train models. Unlike model.train(), this method does N
src/art/local/backend.py:498
↓ 12 callers
Function
migrate_jsonl_to_parquet
Migrate a single JSONL trajectory file to Parquet format. Args: jsonl_path: Path to the JSONL file to migrate. delete_origin
src/art/utils/trajectory_migration.py:177
↓ 12 callers
Method
to_dict
Convert the tool to a dictionary.
src/art/mcp/types.py:27
↓ 12 callers
Function
write_trajectory_groups_parquet
Write trajectory groups to a Parquet file with ZSTD compression. Args: trajectory_groups: List of TrajectoryGroup objects to seriali
src/art/utils/trajectory_logging.py:59
↓ 11 callers
Method
_experimental_push_to_s3
Upload the model directory from local storage to S3.
src/art/local/backend.py:1134
↓ 11 callers
Function
create_lr_schedule
Create learning rate schedule for training with optional warmup. Args: total_steps: Total number of training steps peak_lr:
src/art/utils/sft.py:70
↓ 11 callers
Function
create_sft_dataset_iterator
Prepare trajectories in chunks for multiple model.train_sft() calls. Yields SFTChunk objects so that each call to model.train_sft() produces
src/art/utils/sft.py:135
↓ 11 callers
Method
model_dump
(self, *args, **kwargs)
src/art/model.py:983
↓ 11 callers
Method
train
Reinforce fine-tune the model with a batch of trajectory groups. .. deprecated:: Use ``backend.train(model, trajectory_g
src/art/model.py:1050
↓ 10 callers
Method
_experimental_pull_from_s3
Download the model directory from S3 into local Backend storage. Right now this can be used to pull trajectory logs for processing or model checkpoint
src/art/local/backend.py:1053
↓ 10 callers
Method
_get_wandb_run
Get or create the wandb run for this model.
src/art/model.py:460
↓ 10 callers
Method
insert
(self, rendered_prefix: Sequence[int], raw_prefix: Sequence[int])
src/art/tinker/prefix_cache.py:99
↓ 10 callers
Function
shift_tensor
(tensor: torch.Tensor, pad: int | float | bool)
src/art/loss.py:145
↓ 10 callers
Function
tokens_to_cost
Convert token count to cost in dollars.
src/art/costs.py:87
↓ 9 callers
Method
_fmt_int
(value: object)
src/art/pipeline_trainer/status.py:382
↓ 9 callers
Method
activate_metrics_context
(self, cost_context: str)
src/art/model.py:669
↓ 9 callers
Function
close_proxy
After moving an object to a child process, you can use this function to close the proxy object and terminate the child process. Args:
src/mp_actors/move.py:77
↓ 9 callers
Function
ensure_text
Assert that content is text-only and return it as a string. Raises ValueError if content contains images or multiple parts. Use this to
src/art/tinker/cookbook_v/renderers/base.py:400
↓ 9 callers
Method
list
( self, *, after: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVE
src/art/serverless/client.py:149
↓ 9 callers
Function
move_to_child_process
Move an object to a child process and return a proxy to it. This function creates a proxy object that runs in a separate process. Method cal
src/mp_actors/move.py:54
↓ 9 callers
Method
shuffle
Return a new collection with shuffled scenarios.
src/art/mcp/types.py:136
↓ 9 callers
Method
to_typescript_style
(self, indent: str = "")
src/art/tinker/cookbook_v/renderers/kimi_k2_5_tool_declaration_ts.py:68
↓ 8 callers
Function
_ts
()
src/art/utils/logging.py:19
↓ 8 callers
Function
build_s3_path
Return the fully-qualified S3 URI for this model directory.
src/art/utils/s3.py:27
↓ 8 callers
Method
close
(self)
src/art/backend.py:22
↓ 8 callers
Function
gc_and_empty_cuda_cache
(n: int = 3)
src/art/unsloth/train.py:410
↓ 8 callers
Function
loss_fn
( inputs: "TrainInputs", new_logprobs: torch.Tensor, ref_logprobs: torch.Tensor | None, entrop
src/art/loss.py:23
↓ 8 callers
Method
messages
(self)
src/art/trajectories.py:34
↓ 8 callers
Function
pad
(values: list[list], pad_value)
src/art/preprocessing/pack.py:124
↓ 8 callers
Function
patch
( *args: Any, **kwargs: Any, )
src/art/vllm/patches.py:51
↓ 7 callers
Method
__init__
( self, extra_props: dict[str, Any], *, allowed_constraint_keys: Sequence[str]
src/art/tinker/cookbook_v/renderers/kimi_k2_5_tool_declaration_ts.py:57
↓ 7 callers
Function
_read_field
(container: Any, field: str)
src/art/api_costs.py:109
↓ 7 callers
Method
close
(self)
src/art/serverless/backend.py:86
↓ 7 callers
Function
get_default_art_path
()
src/art/utils/output_dirs.py:7
↓ 7 callers
Method
messages
(self)
src/art/trajectories.py:71
↓ 7 callers
Function
print0
(*values: Any)
src/art/megatron/train.py:133
↓ 7 callers
Function
summarize_trajectory_groups
( trajectory_groups: Iterable[TrajectoryGroup], )
src/art/metrics_taxonomy.py:54
↓ 7 callers
Method
update_pbar
(self, n: int)
src/art/gather.py:211
↓ 6 callers
Function
_format_json
Format JSON data for display
examples/mcp-rl/servers/python/mcp_googlemaps/server.py:486
↓ 6 callers
Function
_format_json
Format JSON data for display
examples/mcp-rl/servers/python/mcp_alphavantage/server.py:359
↓ 6 callers
Function
_get_test_renderer
(name: str, tokenizer: FakeTokenizer)
tests/unit/test_tinker_renderers.py:61
↓ 6 callers
Method
_parse_model_name
(self, model_name: str | None)
src/art/tinker_native/backend.py:722
↓ 6 callers
Function
_parse_parameter_type
( json_schema_object: dict[str, Any] | bool, registry: _SchemaRegistry | None = None )
src/art/tinker/cookbook_v/renderers/kimi_k2_5_tool_declaration_ts.py:374
↓ 6 callers
Function
_read_usage_field
(usage: Any, field: str)
src/art/api_costs.py:83
↓ 6 callers
Method
_route_metrics_and_collect_non_costs
( self, metrics: dict[str, float], split: str )
src/art/model.py:575
↓ 6 callers
Function
_run_inference_on_step
( model: art.TrainableModel, step: int, )
tests/integration/test_multi_checkpoint_training.py:98
↓ 6 callers
Function
average_metric_samples
( metric_samples: Iterable[dict[str, float]], )
src/art/metrics_taxonomy.py:12
↓ 6 callers
Function
build_training_summary_metrics
( summary: TrajectoryBatchSummary, *, include_trainable_groups: bool, )
src/art/metrics_taxonomy.py:94
↓ 6 callers
Method
close
If running vLLM in a separate process, this will kill that process and close the communication threads.
src/art/local/backend.py:170
↓ 6 callers
Function
err
(msg)
src/art/utils/logging.py:39
↓ 6 callers
Method
fetch_data
Fetch data from Alpha Vantage API
examples/mcp-rl/servers/python/mcp_alphavantage/server.py:23
↓ 6 callers
Method
for_cost_context
( self, cost_context: str, *, buffer_scope: str | None = None )
src/art/metrics.py:238
↓ 6 callers
Function
generate_scenarios
Generate scenarios for MCP agent evaluation using OpenAI's o3 model. Args: server_params_path: Relative path to the server_params file (e
examples/mcp-rl/mcp_rl/scenario_generator.py:19
↓ 6 callers
Function
get_model_config
( base_model: str, output_dir: str, config: "InternalModelConfig | None", )
src/art/dev/get_model_config.py:6
↓ 6 callers
Function
get_output_dir_from_model_properties
( project: str, name: str, art_path: str | None = None )
src/art/utils/output_dirs.py:24
↓ 6 callers
Function
is_dedicated_mode
Return True if the config specifies dedicated mode (separate training and inference GPUs).
src/art/dev/validate.py:6
↓ 6 callers
Function
iterate_file
Stream trajectories from a JSONL file for one or more epochs. Uses buffer-based shuffling to randomize order without loading all data in
src/art/utils/sft.py:265
↓ 6 callers
Method
log
( self, *, model_id: str, trajectory_groups: list[TrajectoryGroup], sp
src/art/serverless/client.py:117
↓ 6 callers
Method
metrics_builder
(self, cost_context: str | None = None)
src/art/model.py:663
↓ 6 callers
Function
run_on_workers
Run a function on all workers in a distributed setup. Args: llm: The AsyncLLM instance with workers. func: The function to r
src/art/vllm/engine.py:48
↓ 6 callers
Method
train_sft
Supervised fine-tune the model with an iterable of trajectories. Args: trajectories: An iterable of Trajectory objects.
src/art/model.py:1109
↓ 6 callers
Method
update_wandb_config
Merge configuration into the W&B run config for this model. This can be called before the W&B run exists, in which case the config is
src/art/model.py:423
↓ 5 callers
Method
__new__
( cls, *, name: str, project: str, entity: str | None = None,
src/art/model.py:167
↓ 5 callers
Method
_get_output_dir
Get the output directory for this model.
src/art/model.py:307
↓ 5 callers
Method
_get_request_tenant
( self, request: Request )
src/art/tinker/server.py:109
↓ 5 callers
Method
_get_special_token
(self, name: str)
src/art/tinker/cookbook_v/renderers/deepseek_v3.py:184
↓ 5 callers
Function
_make_inputs
Create minimal TrainInputs-like dict for loss_fn.
src/art/test/test_kl_advantage.py:8
↓ 5 callers
Function
_make_trajectories
Create n dummy trajectories.
tests/unit/test_sft.py:158
↓ 5 callers
Method
_model_inference_name
Return the inference name for a model checkpoint. Args: model: The model. step: If provided, returns name for specifi
src/art/serverless/backend.py:137
↓ 5 callers
Method
delete
Deletes a model from the Backend. Args: model: An art.Model instance to delete.
src/art/serverless/backend.py:117
↓ 5 callers
Function
ensure_bucket_exists
( s3_bucket: str | None = None, profile: str | None = None )
src/art/utils/s3.py:127
next →
1–100 of 1,502, ranked by callers