MCPcopy Create free account

hub / github.com/Nardien/agent-distillation / functions

Functions494 in github.com/Nardien/agent-distillation

↓ 1 callersMethodforward
(self, *args, **kwargs)
src/smolagents/tools.py:172
↓ 1 callersMethodforward
Sends the inputs through the `model`.
src/smolagents/tools.py:1059
↓ 1 callersMethodfrom_folder
Loads an agent from a local folder. Args: folder (`str` or `Path`): The folder where the agent is saved. **kwargs: Ad
src/smolagents/agents.py:979
↓ 1 callersMethodfrom_space
Creates a [`Tool`] from a Space given its id on the Hub. Args: space_id (`str`): The id of the Space on
src/smolagents/tools.py:472
↓ 1 callersFunctionget_answered_questions
Get set of questions that have already been answered Args: file_path: Path to results file Returns: Set of alre
exps_research/unified_framework/utils.py:70
↓ 1 callersFunctionget_current_value
(target: ast.AST)
src/smolagents/local_python_executor.py:613
↓ 1 callersFunctionget_experiment_processor
Factory function to get the appropriate experiment processor class Args: experiment_type: Type of experiment ("reasoning" or "ag
exps_research/unified_framework/processors/factory.py:12
↓ 1 callersFunctionget_imports
Extracts all the libraries (not relative imports) that are imported in a code. Args: code (`str`): Code text to inspect. Return
src/smolagents/_function_type_hints_utils.py:44
↓ 1 callersFunctionget_json_schema
This function generates a JSON schema for a given function, based on its docstring and type hints. This is mostly used for passing lists of t
src/smolagents/_function_type_hints_utils.py:82
↓ 1 callersMethodget_most_common_output_code
(self, pairs)
src/smolagents/agents.py:1461
↓ 1 callersFunctionget_retriever
(config)
search/retriever_server.py:282
↓ 1 callersFunctionget_tools_definition_code
(tools: Dict[str, Tool])
src/smolagents/tools.py:1097
↓ 1 callersFunctionget_user_input
()
examples/quick_start.py:32
↓ 1 callersFunctioninitialize_agent
Initialize the CodeAgent with the specified model.
src/smolagents/vision_web_browser.py:114
↓ 1 callersFunctioninitialize_driver
Initialize the Selenium WebDriver.
src/smolagents/vision_web_browser.py:104
↓ 1 callersFunctioninner_evaluate
(generators: List[ast.comprehension], index: int, current_state: Dict[str, Any])
src/smolagents/local_python_executor.py:1018
↓ 1 callersFunctionis_same_method
Compare two methods by their source code.
src/smolagents/utils.py:271
↓ 1 callersFunctionis_static_int
(node)
src/smolagents/local_python_executor.py:202
↓ 1 callersFunctionis_valid_name
(name: str)
src/smolagents/utils.py:456
↓ 1 callersMethodlaunch
(self, share: bool = True, **kwargs)
src/smolagents/gradio_ui.py:264
↓ 1 callersFunctionload_api_key
Load API key from file
exps_research/unified_framework/models.py:11
↓ 1 callersFunctionload_api_key
Load OpenAI API key from file
exps_research/unified_framework/score_answers.py:24
↓ 1 callersFunctionload_model
(model_path: str, use_fp16: bool = False)
search/retriever_server.py:47
↓ 1 callersFunctionload_prompt
Load the system prompt from YAML file
exps_research/train_utils/preprocess.py:56
↓ 1 callersFunctionload_prompt
Load system prompt from YAML file Args: prompt_name: Name of the prompt file (without extension) Returns: Syste
exps_research/unified_framework/experiment.py:22
↓ 1 callersMethodlog_code
(self, title: str, content: str, level: int = LogLevel.INFO)
src/smolagents/monitoring.py:128
↓ 1 callersFunctionmain
()
serve_vllm.py:6
↓ 1 callersFunctionmain
( prompt: str, tools: list[str], model_type: str, model_id: str, api_base: str | None = No
src/smolagents/cli.py:106
↓ 1 callersFunctionmain
(prompt: str, model_type: str, model_id: str)
src/smolagents/vision_web_browser.py:190
↓ 1 callersFunctionmain
()
examples/quick_start.py:58
↓ 1 callersFunctionmain
(args)
exps_research/build_prefix_memory.py:19
↓ 1 callersFunctionmain
(args)
exps_research/finetune_sft.py:104
↓ 1 callersFunctionmain
(args)
exps_research/first_thought_prefix/build_prefix_memory.py:19
↓ 1 callersFunctionmain
(args)
exps_research/unified_framework/filter_reasoning_training_data.py:6
↓ 1 callersFunctionmain
(args)
exps_research/unified_framework/filter_agent_training_data.py:106
↓ 1 callersFunctionmake_image_url
(base64_image)
src/smolagents/utils.py:445
↓ 1 callersFunctionmake_serializable
Convert non-serializable types to serializable formats.
exps_research/unified_framework/utils.py:106
↓ 1 callersMethodmake_stopping_criteria
(self, stop_sequences: List[str], tokenizer)
src/smolagents/models.py:752
↓ 1 callersFunctionopen_jsonl
(datapath)
exps_research/build_prefix_memory.py:10
↓ 1 callersFunctionopen_jsonl
(datapath)
exps_research/first_thought_prefix/build_prefix_memory.py:10
↓ 1 callersFunctionparse_arguments
()
src/smolagents/cli.py:29
↓ 1 callersFunctionparse_arguments
()
src/smolagents/vision_web_browser.py:27
↓ 1 callersFunctionparse_json_blob
Extracts the JSON blob from the input and returns the JSON data and the rest of the input.
src/smolagents/utils.py:153
↓ 1 callersFunctionpooling
( pooler_output, last_hidden_state, attention_mask = None, pooling_method = "mean" )
search/retriever_server.py:57
↓ 1 callersFunctionprepare_output_path
Prepare output path for experiment results Args: dataset_file: Path to dataset file model_id: Model ID log_folde
exps_research/unified_framework/utils.py:140
↓ 1 callersFunctionpreprocess_cot_dataset
(datapath)
exps_research/train_utils/preprocess.py:130
↓ 1 callersFunctionpreprocess_logs
(log_path)
exps_research/train_utils/preprocess.py:175
↓ 1 callersFunctionprint_pretty_messages
(messages)
exps_research/train_utils/preprocess.py:36
↓ 1 callersMethodprocess_dataset
Process a dataset of entries Args: entries: List of dataset entries output_file: Path to output file
exps_research/unified_framework/processors/base.py:167
↓ 1 callersFunctionprocess_entry
Process a single entry with its own model instance
exps_research/unified_framework/score_answers.py:135
↓ 1 callersFunctionprocess_qa_experiment
Process a QA experiment using the appropriate processor Args: dataset_file: Path to dataset file model_kwargs: Model con
exps_research/unified_framework/experiment.py:38
↓ 1 callersMethodprovide_final_answer
Provide the final answer to the task, based on the logs of the agent's interactions. Args: task (`str`): Task to perform
src/smolagents/agents.py:554
↓ 1 callersFunctionpull_messages_from_step
Extract ChatMessage objects from agent steps with proper nesting
src/smolagents/gradio_ui.py:40
↓ 1 callersMethodregister_prefix
Register the prefix of thought, which will be used only in the first step.
src/smolagents/agents.py:1455
↓ 1 callersFunctionremove_reference_tags
(text)
exps_research/train_utils/preprocess.py:76
↓ 1 callersFunctionremove_stop_sequences
(content: str, stop_sequences: List[str])
src/smolagents/models.py:168
↓ 1 callersFunctionremove_think_tags
(text)
src/smolagents/models.py:249
↓ 1 callersFunctionremove_think_tokens
(messages: List[Dict[str, str]])
src/smolagents/models.py:253
↓ 1 callersMethodreset
Reset cost tracker state Args: cost_threshold: Maximum cost allowed before stopping (in USD)
exps_research/unified_framework/processors/cost_tracker.py:29
↓ 1 callersFunctionrobust_serialize
Attempt to serialize an object to JSON. If it fails, convert to string.
exps_research/unified_framework/utils.py:94
↓ 1 callersFunctionrun_agent_experiment
Compatibility wrapper for agent experiments
exps_research/unified_framework/run_agent.py:15
↓ 1 callersFunctionrun_reasoning_experiment
Compatibility wrapper for reasoning experiments
exps_research/unified_framework/run_reasoning.py:15
↓ 1 callersMethodsave
Saves the relevant code files for your agent. This will copy the code of your agent in `output_dir` as well as autogenerate: - a `to
src/smolagents/agents.py:764
↓ 1 callersMethodsave_memory_to_logs
Save the agent's memory to a log file in the logs directory. Args: task (`str`): The task that was executed, used for the log fil
src/smolagents/agents.py:639
↓ 1 callersMethodsend_tools
(self, tools: Dict[str, Tool])
src/smolagents/remote_executors.py:55
↓ 1 callersMethodsend_variables
Send variables to the kernel namespace using pickle.
src/smolagents/remote_executors.py:70
↓ 1 callersMethodsetup
Instantiates the `pre_processor`, `model` and `post_processor` if necessary.
src/smolagents/tools.py:1017
↓ 1 callersFunctionsetup_agent
()
examples/quick_start.py:37
↓ 1 callersFunctionsetup_savedir
(args)
exps_research/finetune_sft.py:50
↓ 1 callersFunctionsetup_scoring_model
Initialize the OpenAI model for scoring
exps_research/unified_framework/score_answers.py:29
↓ 1 callersMethodstep
To be implemented in children classes. Should return either None if the step is not final.
src/smolagents/agents.py:606
↓ 1 callersMethodstep
Perform one step in the ReAct framework: the agent thinks, acts, and observes the result. Returns None if the step is not final.
src/smolagents/agents.py:1476
↓ 1 callersFunctionstr_to_pmatrix
(input_str)
exps_research/unified_framework/math_utils/qwen_math_parser.py:621
↓ 1 callersFunctionstr_to_pmatrix
(input_str)
exps_research/unified_framework/math_utils/qwen_math_grader.py:60
↓ 1 callersFunctionstr_to_pmatrix
(input_str)
exps_research/unified_framework/processors/qwen_math_parser.py:621
↓ 1 callersFunctionstream_to_gradio
Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages.
src/smolagents/gradio_ui.py:160
↓ 1 callersFunctionstrip_string
(string, skip_unit=False)
exps_research/unified_framework/processors/qwen_math_parser.py:238
↓ 1 callersMethodto_dict
Convert the agent to a dictionary representation. Returns: `dict`: Dictionary representation of the agent.
src/smolagents/agents.py:882
↓ 1 callersMethodto_raw
Returns the "raw" version of that object. In the case of an AgentImage, it is a PIL.Image.Image.
src/smolagents/agent_types.py:118
↓ 1 callersMethodto_string
Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized version of the image.
src/smolagents/agent_types.py:135
↓ 1 callersMethodto_string
Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized version of the audio.
src/smolagents/agent_types.py:236
↓ 1 callersFunctionvalidate_after_init
(cls)
src/smolagents/tools.py:54
↓ 1 callersMethodvalidate_arguments
(self)
src/smolagents/tools.py:116
↓ 1 callersMethodvisualize_agent_tree
(self, agent)
src/smolagents/monitoring.py:177
Method__call__
Adds additional prompting for the managed agent, runs it, and wraps the output. This method is called only by a managed agent.
src/smolagents/agents.py:619
Method__call__
(self, code_action: str)
src/smolagents/local_python_executor.py:1627
Method__call__
Process the input messages and return the model's response. Parameters: messages (`List[Dict[str, str]]`): A list
src/smolagents/models.py:336
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:478
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:606
Method__call__
(self, input_ids, scores, **kwargs)
src/smolagents/models.py:764
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:773
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:921
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1022
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1102
Method__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1241
Method__call__
Check if code is a final answer and run it accordingly
src/smolagents/remote_executors.py:82
Method__call__
(self, *args, sanitize_inputs_outputs: bool = False, **kwargs)
src/smolagents/tools.py:175
Method__call__
(self, *args, sanitize_inputs_outputs: bool = False, **kwargs)
src/smolagents/tools.py:1074
Method__iadd__
Implements the += operator
src/smolagents/local_python_executor.py:140
Method__init__
(self, model_name, model_path, pooling_method, max_length, use_fp16)
search/retriever_server.py:74
← previousnext →201–300 of 494, ranked by callers