MCPcopy Create free account

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

Functions494 in github.com/Nardien/agent-distillation

↓ 2 callersFunctionnumeric_equal
(prediction: float, reference: float)
exps_research/unified_framework/math_utils/qwen_math_parser.py:824
↓ 2 callersFunctionnumeric_equal
(prediction: float, reference: float)
exps_research/unified_framework/math_utils/qwen_math_grader.py:275
↓ 2 callersFunctionnumeric_equal
(prediction: float, reference: float)
exps_research/unified_framework/processors/qwen_math_parser.py:824
↓ 2 callersFunctionparse_code_blobs
Extract code blocs from the LLM's output. If a valid code block is passed, it returns it directly. Args: text (`str`): LLM's output
src/smolagents/utils.py:176
↓ 2 callersFunctionparse_json_if_needed
(arguments: Union[str, dict])
src/smolagents/models.py:118
↓ 2 callersMethodreset
(self)
src/smolagents/monitoring.py:51
↓ 2 callersMethodroles
(cls)
src/smolagents/models.py:136
↓ 2 callersMethodsanitize_argument_for_prediction
(self, arg)
src/smolagents/tools.py:565
↓ 2 callersMethodsave
Saves the image to a file. Args: output_bytes (bytes): The output bytes to save the image to. format (str): T
src/smolagents/agent_types.py:163
↓ 2 callersMethodsave
Saves the relevant code files for your tool so it can be pushed to the Hub. This will copy the code of your tool in `output_dir` as w
src/smolagents/tools.py:266
↓ 2 callersFunctionscore_qa_results
Score all QA results in the given folder using multiple threads Args: log_folder: Path to the folder containing the results m
exps_research/unified_framework/score_answers.py:175
↓ 2 callersMethodsetup
Overwrite this method here for any operation that is expensive and needs to be executed before you start using your tool. Such as loa
src/smolagents/tools.py:195
↓ 2 callersFunctionsetup_model
Initialize a model for experiments Args: model_type: Type of model to use ("openai" or "vllm") model_id: Model ID to use
exps_research/unified_framework/models.py:17
↓ 2 callersFunctiontypewriter
Print text like a typewriter effect.
examples/quick_start.py:18
↓ 2 callersFunctionvalidate_tool_attributes
Validates that a Tool class follows the proper patterns: 0. Any argument of __init__ should have a default. Args chosen at init are not t
src/smolagents/tool_validation.py:146
↓ 1 callersMethod__init__
( self, tools: List[Tool], model: Callable[[List[Dict[str, str]]], ChatMessage],
src/smolagents/agents.py:1357
↓ 1 callersMethod__init__
(self, additional_imports: List[str], logger, **kwargs)
src/smolagents/remote_executors.py:105
↓ 1 callersMethod__init__
(self, *args, **kwargs)
src/smolagents/tools.py:109
↓ 1 callersMethod_batch_search
(self, query_list: List[str], num: int, return_score: bool)
search/retriever_server.py:146
↓ 1 callersMethod_check_contain_doc
(self)
search/retriever_server.py:165
↓ 1 callersMethod_check_init_function_parameters
(self, node)
src/smolagents/tool_validation.py:195
↓ 1 callersMethod_create_action_step
(self, step_start_time: float, images: List["PIL.Image.Image"] | None)
src/smolagents/agents.py:388
↓ 1 callersMethod_create_planning_step
(self, task, is_first_step: bool, step: int)
src/smolagents/agents.py:432
↓ 1 callersMethod_execute_step
(self, task: str, memory_step: ActionStep)
src/smolagents/agents.py:391
↓ 1 callersMethod_finalize_step
(self, memory_step: ActionStep, step_start_time: float)
src/smolagents/agents.py:405
↓ 1 callersFunction_fix_a_slash_b
(string)
exps_research/unified_framework/math_utils/qwen_math_parser.py:69
↓ 1 callersFunction_fix_a_slash_b
(string)
exps_research/unified_framework/processors/qwen_math_parser.py:69
↓ 1 callersFunction_fix_fracs
(string)
exps_research/unified_framework/math_utils/qwen_math_parser.py:37
↓ 1 callersFunction_fix_fracs
(string)
exps_research/unified_framework/processors/qwen_math_parser.py:37
↓ 1 callersFunction_fix_sqrt
(string)
exps_research/unified_framework/math_utils/qwen_math_parser.py:86
↓ 1 callersFunction_fix_sqrt
(string)
exps_research/unified_framework/processors/qwen_math_parser.py:86
↓ 1 callersFunction_get_json_schema_type
(param_type: str)
src/smolagents/_function_type_hints_utils.py:379
↓ 1 callersMethod_handle_max_steps_reached
(self, task: str, images: List["PIL.Image.Image"], step_start_time: float)
src/smolagents/agents.py:415
↓ 1 callersMethod_initialize_hub_repo
Initialize repository on Hugging Face Hub.
src/smolagents/tools.py:337
↓ 1 callersFunction_parse_google_format_docstring
Parses a Google-style docstring to extract the function description, argument descriptions, and return description. Args: docstr
src/smolagents/_function_type_hints_utils.py:241
↓ 1 callersFunction_parse_type_hint
(hint: str)
src/smolagents/_function_type_hints_utils.py:303
↓ 1 callersMethod_prepare_hub_files
Prepare files for Hub commit.
src/smolagents/tools.py:350
↓ 1 callersMethod_search
(self, query: str, num: int, return_score: bool)
search/retriever_server.py:143
↓ 1 callersMethod_search
(self, query: str, num: int = None, return_score: bool = False)
search/retriever_server.py:168
↓ 1 callersMethod_send_execute_request
Send code execution request to kernel.
src/smolagents/remote_executors.py:309
↓ 1 callersMethod_setup_managed_agents
(self, managed_agents)
src/smolagents/agents.py:243
↓ 1 callersMethod_setup_tools
(self, tools, add_base_tools)
src/smolagents/agents.py:251
↓ 1 callersMethod_substitute_state_variables
Replace string values in arguments with their corresponding state values if they exist.
src/smolagents/agents.py:1265
↓ 1 callersFunction_test_math_equal
()
exps_research/unified_framework/math_utils/qwen_math_grader.py:360
↓ 1 callersMethod_validate_final_answer
(self, final_answer: Any)
src/smolagents/agents.py:398
↓ 1 callersMethod_validate_name
(self, name: str | None)
src/smolagents/agents.py:238
↓ 1 callersMethod_validate_tools_and_managed_agents
(self, tools, managed_agents)
src/smolagents/agents.py:264
↓ 1 callersMethodbatch_search
(self, query_list: List[str], num: int = None, return_score: bool = False)
search/retriever_server.py:152
↓ 1 callersFunctioncalculate_cost
Calculate cost based on GPT-4 pricing
exps_research/unified_framework/score_answers.py:37
↓ 1 callersFunctioncall_with_timeout
(func, *args, timeout=3, **kwargs)
exps_research/unified_framework/math_utils/qwen_math_parser.py:895
↓ 1 callersFunctioncall_with_timeout
(func, *args, timeout=1, **kwargs)
exps_research/unified_framework/math_utils/qwen_math_grader.py:346
↓ 1 callersFunctioncall_with_timeout
(func, *args, timeout=3, **kwargs)
exps_research/unified_framework/processors/qwen_math_parser.py:895
↓ 1 callersMethodcheck_code_integrity
(self, chat_message)
src/smolagents/agents.py:1435
↓ 1 callersFunctioncheck_two_system_messages
(messages)
exps_research/train_utils/preprocess.py:85
↓ 1 callersFunctionchoice_answer_clean
(pred: str)
exps_research/unified_framework/math_utils/qwen_math_grader.py:25
↓ 1 callersFunctionclean_roles
(messages)
exps_research/train_utils/preprocess.py:63
↓ 1 callersFunctionclean_user_message
(messages)
exps_research/train_utils/preprocess.py:80
↓ 1 callersFunctionconvert
(obj)
src/smolagents/models.py:47
↓ 1 callersFunctionconvert_pi_to_number
(code_string)
exps_research/unified_framework/math_utils/qwen_math_parser.py:463
↓ 1 callersFunctionconvert_pi_to_number
(code_string)
exps_research/unified_framework/processors/qwen_math_parser.py:463
↓ 1 callersFunctionconvert_word_number
(text: str)
exps_research/unified_framework/math_utils/qwen_math_parser.py:91
↓ 1 callersFunctionconvert_word_number
(text: str)
exps_research/unified_framework/processors/qwen_math_parser.py:91
↓ 1 callersFunctioncount_loop_depth
Recursively count the depth of nested loops in AST. Includes for-loops, while-loops, async-for, and comprehensions.
src/smolagents/local_python_executor.py:181
↓ 1 callersMethodcreate_app
(self)
src/smolagents/gradio_ui.py:267
↓ 1 callersMethodcreate_client
(self)
src/smolagents/models.py:1097
↓ 1 callersFunctioncreate_function
( func_def: ast.FunctionDef, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_
src/smolagents/local_python_executor.py:488
↓ 1 callersMethodcreate_models
Create model instances for all workers Args: max_workers: Number of worker threads/processes use_loc
exps_research/unified_framework/processors/base.py:153
↓ 1 callersMethodcreate_python_executor
(self)
src/smolagents/agents.py:1398
↓ 1 callersFunctiondetect_dangerous_calls
(expression: ast.AST, state=None)
src/smolagents/local_python_executor.py:222
↓ 1 callersFunctionevaluate_assert
( assert_node: ast.Assert, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_to
src/smolagents/local_python_executor.py:1149
↓ 1 callersFunctionevaluate_assign
( assign: ast.Assign, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools:
src/smolagents/local_python_executor.py:737
↓ 1 callersFunctionevaluate_attribute
( expression: ast.Attribute, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_
src/smolagents/local_python_executor.py:409
↓ 1 callersFunctionevaluate_augassign
( expression: ast.AugAssign, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_
src/smolagents/local_python_executor.py:606
↓ 1 callersFunctionevaluate_binop
( binop: ast.BinOp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: Di
src/smolagents/local_python_executor.py:697
↓ 1 callersFunctionevaluate_boolop
( node: ast.BoolOp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: Di
src/smolagents/local_python_executor.py:678
↓ 1 callersFunctionevaluate_call
( call: ast.Call, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: Dict
src/smolagents/local_python_executor.py:792
↓ 1 callersFunctionevaluate_class_def
( class_def: ast.ClassDef, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_to
src/smolagents/local_python_executor.py:566
↓ 1 callersFunctionevaluate_condition
( condition: ast.Compare, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_too
src/smolagents/local_python_executor.py:914
↓ 1 callersFunctionevaluate_delete
Evaluate a delete statement (del x, del x[y]). Args: delete_node: The AST Delete node to evaluate state: The current state d
src/smolagents/local_python_executor.py:1322
↓ 1 callersFunctionevaluate_dictcomp
( dictcomp: ast.DictComp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_too
src/smolagents/local_python_executor.py:1280
↓ 1 callersFunctionevaluate_for
( for_loop: ast.For, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: D
src/smolagents/local_python_executor.py:978
↓ 1 callersFunctionevaluate_function_def
( func_def: ast.FunctionDef, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_
src/smolagents/local_python_executor.py:555
↓ 1 callersFunctionevaluate_if
( if_statement: ast.If, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools
src/smolagents/local_python_executor.py:956
↓ 1 callersFunctionevaluate_import
(expression, state, authorized_imports)
src/smolagents/local_python_executor.py:1244
↓ 1 callersFunctionevaluate_lambda
( lambda_expression: ast.Lambda, state: Dict[str, Any], static_tools: Dict[str, Callable], cus
src/smolagents/local_python_executor.py:442
↓ 1 callersFunctionevaluate_listcomp
( listcomp: ast.ListComp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_too
src/smolagents/local_python_executor.py:1011
↓ 1 callersFunctionevaluate_name
( name: ast.Name, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: Dict
src/smolagents/local_python_executor.py:893
↓ 1 callersFunctionevaluate_python_code
Evaluate a python expression using the content of the variables stored in a state and only evaluating a given set of functions. This fun
src/smolagents/local_python_executor.py:1515
↓ 1 callersFunctionevaluate_raise
( raise_node: ast.Raise, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tool
src/smolagents/local_python_executor.py:1125
↓ 1 callersFunctionevaluate_setcomp
( setcomp: ast.SetComp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools
src/smolagents/local_python_executor.py:1055
↓ 1 callersFunctionevaluate_subscript
( subscript: ast.Subscript, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_t
src/smolagents/local_python_executor.py:873
↓ 1 callersFunctionevaluate_try
( try_node: ast.Try, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools: D
src/smolagents/local_python_executor.py:1090
↓ 1 callersFunctionevaluate_unaryop
( expression: ast.UnaryOp, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_to
src/smolagents/local_python_executor.py:422
↓ 1 callersFunctionevaluate_while
( while_loop: ast.While, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tool
src/smolagents/local_python_executor.py:466
↓ 1 callersFunctionevaluate_with
( with_node: ast.With, state: Dict[str, Any], static_tools: Dict[str, Callable], custom_tools:
src/smolagents/local_python_executor.py:1167
↓ 1 callersMethodexecute_tool_call
Execute a tool or managed agent with the provided arguments. The arguments are replaced with the actual values from the state if the
src/smolagents/agents.py:1274
↓ 1 callersFunctionextract_answer
(pred_str, data_name='math', use_last_number=True)
exps_research/unified_framework/math_utils/qwen_math_parser.py:485
↓ 1 callersFunctionextract_answer
(pred_str, data_name='math', use_last_number=True)
exps_research/unified_framework/processors/qwen_math_parser.py:485
↓ 1 callersFunctionfancy_intro
()
examples/quick_start.py:26
↓ 1 callersFunctionfind_majority_and_first_index
(lst)
exps_research/unified_framework/processors/reasoning.py:25
← previousnext →101–200 of 494, ranked by callers