MCPcopy Create free account

hub / github.com/SakanaAI/AI-Scientist-v2 / functions

Functions307 in github.com/SakanaAI/AI-Scientist-v2

↓ 122 callersMethodappend
Append a new node to the journal.
ai_scientist/treesearch/journal.py:374
↓ 32 callersMethodwrite
(self, msg)
ai_scientist/treesearch/interpreter.py:74
↓ 20 callersFunctionget_response_from_llm
( prompt, client, model, system_message, print_debug=False, msg_history=None, temp
ai_scientist/llm.py:267
↓ 20 callersFunctionquery
General LLM query for various backends with a single system and user message. Supports function calling for some backends. Args:
ai_scientist/treesearch/backend/__init__.py:19
↓ 14 callersMethodget_best_node
Return the best solution found so far.
ai_scientist/treesearch/journal.py:420
↓ 13 callersMethodrun
Execute the provided Python command in a separate process and return its output. Parameters: code (str): Python code to
ai_scientist/treesearch/interpreter.py:213
↓ 11 callersFunctionextract_json_between_markers
(llm_output: str)
ai_scientist/llm.py:452
↓ 11 callersFunctionwrap_code
Wraps code with three backticks.
ai_scientist/treesearch/utils/response.py:7
↓ 7 callersMethodcleanup_session
(self)
ai_scientist/treesearch/interpreter.py:196
↓ 7 callersFunctioncreate_client
(model)
ai_scientist/llm.py:480
↓ 7 callersMethodplan_and_code_query
Generate a natural language plan + code in the same LLM call and split them apart.
ai_scientist/treesearch/parallel_agent.py:658
↓ 7 callersMethodto_dict
Convert node to dictionary for serialization
ai_scientist/treesearch/journal.py:214
↓ 6 callersMethodfrom_dict
Create a Node from a dictionary, optionally linking to journal for relationships
ai_scientist/treesearch/journal.py:294
↓ 6 callersFunctionget_node_log
(node)
ai_scientist/treesearch/log_summarization.py:156
↓ 6 callersMethodupdate
()
ai_scientist/treesearch/utils/viz_templates/template.js:47
↓ 5 callersMethod_get_best_implementation
Get the best implementation from a completed stage
ai_scientist/treesearch/agent_manager.py:538
↓ 5 callersFunctioncompile_latex
(cwd, pdf_file, timeout=30)
ai_scientist/perform_icbinb_writeup.py:45
↓ 5 callersMethodgenerate_summary
Generate a summary of the research progress using LLM, including both successes and failures.
ai_scientist/treesearch/journal.py:504
↓ 5 callersFunctionload_paper
(pdf_path, num_pages=None, min_size=100)
ai_scientist/perform_llm_review.py:257
↓ 5 callersMethodstep
(self, exec_callback: ExecCallbackType)
ai_scientist/treesearch/parallel_agent.py:2053
↓ 4 callersMethodparse_stage_names
Parse stage name into main stage number, main stage name, sub-stage number, and sub-stage name
ai_scientist/treesearch/agent_manager.py:927
↓ 3 callersMethod_generate_node_summary
Generate a summary of the node's experimental findings
ai_scientist/treesearch/parallel_agent.py:1035
↓ 3 callersMethod_get_max_iterations
Get max iterations for a stage from config or default
ai_scientist/treesearch/agent_manager.py:171
↓ 3 callersFunction_parse_keyword_prefix_response
Parse the response into name and description based on keyword prefix
ai_scientist/treesearch/parallel_agent.py:41
↓ 3 callersFunctioncalculate_accuracy
(model, data_loader, device, max_batches=None)
ai_scientist/ideas/i_cant_believe_its_not_betterrealworld.py:235
↓ 3 callersFunctioncalculate_accuracy
(model, data_loader, device, max_batches=None)
ai_scientist/ideas/i_cant_believe_its_not_better.py:267
↓ 3 callersMethodcolor
()
ai_scientist/treesearch/utils/viz_templates/template.js:72
↓ 3 callersFunctioncompile_latex
(cwd, pdf_file, timeout=30)
ai_scientist/perform_writeup.py:39
↓ 3 callersFunctionencode_image_to_base64
Convert an image to base64 string.
ai_scientist/vlm.py:35
↓ 3 callersFunctionextract_figure_screenshots
Extract screenshots for figure captions ("Figure X." or "Figure X:") and also gather text blocks (anywhere in the PDF) mentioning that ex
ai_scientist/perform_vlm_review.py:154
↓ 3 callersFunctionextract_json_between_markers
(llm_output: str)
ai_scientist/vlm.py:216
↓ 3 callersFunctionfilter_experiment_summaries
(exp_summaries, step_name)
ai_scientist/perform_icbinb_writeup.py:691
↓ 3 callersFunctionget_reflection_page_info
(reflection_pdf, page_limit)
ai_scientist/perform_icbinb_writeup.py:304
↓ 3 callersFunctionget_response_from_vlm
Get response from vision-language model.
ai_scientist/vlm.py:132
↓ 3 callersFunctionload_exp_summaries
Load the experiment summaries from the base folder.
ai_scientist/perform_icbinb_writeup.py:665
↓ 3 callersFunctionload_idea_text
Load the idea text from the base folder.
ai_scientist/perform_icbinb_writeup.py:648
↓ 3 callersFunctionstep_callback
(stage, journal)
ai_scientist/treesearch/perform_experiments_bfts_with_agentmanager.py:103
↓ 2 callersMethod_curate_task_desc
(self, stage: Stage)
ai_scientist/treesearch/agent_manager.py:216
↓ 2 callersMethod_drain_queues
Quickly drain all in-flight messages to prevent blocking.
ai_scientist/treesearch/interpreter.py:176
↓ 2 callersFunction_get_next_logindex
Get the next available index for a log directory.
ai_scientist/treesearch/utils/config.py:112
↓ 2 callersMethod_parse_vlm_feedback
Parse the feedback from the VLM
ai_scientist/treesearch/agent_manager.py:331
↓ 2 callersMethodacquire_gpu
Assigns a GPU to a process
ai_scientist/treesearch/parallel_agent.py:1099
↓ 2 callersMethodadd_interaction
Record a single interaction with the model.
ai_scientist/utils/token_tracker.py:75
↓ 2 callersMethodadd_tokens
( self, model: str, prompt_tokens: int, completion_tokens: int, reason
ai_scientist/utils/token_tracker.py:62
↓ 2 callersFunctionaggregate_plots
( base_folder: str, model: str = "o1-2024-12-17", n_reflections: int = 5 )
ai_scientist/perform_plotting.py:136
↓ 2 callersFunctionbackoff_create
( create_fn: Callable, retry_exceptions: list[Exception], *args, **kwargs )
ai_scientist/treesearch/backend/utils.py:23
↓ 2 callersFunctionclean_lines
Given raw text content, split it into lines and remove lines that are likely headers/footers or otherwise not part of the main content.
ai_scientist/perform_icbinb_writeup.py:111
↓ 2 callersFunctionclean_up_dataset
(path: Path)
ai_scientist/treesearch/utils/__init__.py:40
↓ 2 callersFunctioncompile_prompt_to_md
Convert a prompt into markdown format
ai_scientist/treesearch/backend/utils.py:44
↓ 2 callersFunctionextract_abstract
(text)
ai_scientist/perform_vlm_review.py:311
↓ 2 callersFunctionextract_code
Extract python code blocks from the text.
ai_scientist/treesearch/utils/response.py:55
↓ 2 callersFunctionextract_code_snippet
Look for a Python code block in triple backticks in the LLM response. Return only that code. If no code block is found, return the entire tex
ai_scientist/perform_plotting.py:89
↓ 2 callersFunctionextract_text_up_to_code
Extract (presumed) natural language text up to the start of the first code block.
ai_scientist/treesearch/utils/response.py:79
↓ 2 callersFunctionformat_code
Format Python code using Black.
ai_scientist/treesearch/utils/response.py:86
↓ 2 callersFunctiongather_citations
Gather citations for a paper, with ability to resume from previous progress. Args: base_folder: Path to project folder num_c
ai_scientist/perform_icbinb_writeup.py:745
↓ 2 callersFunctiongenerate_vlm_img_review
(img, model, client)
ai_scientist/perform_vlm_review.py:363
↓ 2 callersFunctionget_ai_client
Get the appropriate AI client based on the model string. Args: model (str): string identifier for the model to use (e.g. "gpt-4-turb
ai_scientist/treesearch/backend/__init__.py:4
↓ 2 callersFunctionget_completed_stages
Determine completed stages by checking for the existence of stage directories that contain evidence of completion (tree_data.json, tree_plot.
ai_scientist/treesearch/utils/tree_export.py:43
↓ 2 callersFunctionget_file_len_size
Calculate the size of a file (#lines for plaintext files, otherwise #bytes) Also returns a human-readable string representation of the size.
ai_scientist/treesearch/utils/data_preview.py:19
↓ 2 callersMethodget_mean_value
Get the mean value across all metrics and datasets
ai_scientist/treesearch/utils/metric.py:302
↓ 2 callersMethodget_node_by_id
Get a node by its ID.
ai_scientist/treesearch/journal.py:409
↓ 2 callersFunctionget_nodes_infos
(nodes)
ai_scientist/treesearch/log_summarization.py:109
↓ 2 callersMethodisMouseOver
(p5)
ai_scientist/treesearch/utils/viz_templates/template.js:120
↓ 2 callersFunctionload_cfg
Load config from .yaml file and CLI args, and set up logging directory.
ai_scientist/treesearch/utils/config.py:134
↓ 2 callersFunctionmake_llm_call
(client, model, temperature, system_message, prompt)
ai_scientist/llm.py:216
↓ 2 callersFunctionopt_messages_to_list
( system_message: str | None, user_message: str | None )
ai_scientist/treesearch/backend/utils.py:33
↓ 2 callersFunctionoverall_summarize
(journals, cfg=None)
ai_scientist/treesearch/log_summarization.py:299
↓ 2 callersFunctionperform_experiments_bfts
(config_path: str)
ai_scientist/treesearch/perform_experiments_bfts_with_agentmanager.py:58
↓ 2 callersFunctionperform_imgs_cap_ref_review
(client, client_model, pdf_path)
ai_scientist/perform_vlm_review.py:372
↓ 2 callersFunctionperform_writeup
( base_folder, no_writing=False, num_cite_rounds=20, small_model="gpt-4o-2024-05-13", big_
ai_scientist/perform_writeup.py:455
↓ 2 callersMethodrelease_gpu
Releases GPU assigned to a process
ai_scientist/treesearch/parallel_agent.py:1112
↓ 2 callersMethodrender
(p5)
ai_scientist/treesearch/utils/viz_templates/template.js:79
↓ 2 callersFunctionrun_aggregator_script
( aggregator_code, aggregator_script_path, base_folder, script_name )
ai_scientist/perform_plotting.py:99
↓ 2 callersFunctionsave_token_tracker
(idea_dir)
launch_scientist_bfts.py:35
↓ 2 callersFunctionsearch_for_papers
(query, result_limit=10)
ai_scientist/tools/semantic_scholar.py:104
↓ 2 callersFunctionstartSketch
(stageId)
ai_scientist/treesearch/utils/viz_templates/template.js:352
↓ 2 callersFunctionupdateNodeInfo
(nodeIndex)
ai_scientist/treesearch/utils/viz_templates/template.js:328
↓ 1 callersMethod__init__
(self, num_gpus: int)
ai_scientist/treesearch/parallel_agent.py:1094
↓ 1 callersMethod__post_init__
(self)
ai_scientist/treesearch/utils/metric.py:144
↓ 1 callersMethod__repr__
Return string representation
ai_scientist/treesearch/utils/metric.py:259
↓ 1 callersMethod__str__
(self)
ai_scientist/treesearch/utils/metric.py:206
↓ 1 callersMethod_aggregate_seed_eval_results
Generate aggregated plots from multi-seed evaluation results. Args: seed_nodes: List of nodes from seed evaluation pa
ai_scientist/treesearch/parallel_agent.py:2228
↓ 1 callersMethod_analyze_plots_with_vlm
Analyze experimental plots using VLM
ai_scientist/treesearch/parallel_agent.py:894
↓ 1 callersMethod_analyze_progress
Analyze progress and convergence in the current stage
ai_scientist/treesearch/agent_manager.py:1127
↓ 1 callersMethod_check_stage_completion
Check if current stage is complete based on criteria
ai_scientist/treesearch/agent_manager.py:410
↓ 1 callersMethod_check_substage_completion
Check if the current sub-stage is complete
ai_scientist/treesearch/agent_manager.py:343
↓ 1 callersMethod_create_agent_for_stage
Create a ParallelAgent configured for the given stage
ai_scientist/treesearch/agent_manager.py:274
↓ 1 callersMethod_create_initial_stage
Create the initial stage configuration
ai_scientist/treesearch/agent_manager.py:200
↓ 1 callersMethod_create_next_main_stage
( self, current_substage: Stage, journal: Journal )
ai_scientist/treesearch/agent_manager.py:664
↓ 1 callersMethod_create_next_substage
Create the next sub-stage. Ask LLM to come up with the next sub-stage name and goals based on what has been done so far.
ai_scientist/treesearch/agent_manager.py:638
↓ 1 callersMethod_debug
(self, parent_node: Node)
ai_scientist/treesearch/parallel_agent.py:494
↓ 1 callersMethod_define_global_metrics
Define eval metric to be used across all experiments
ai_scientist/treesearch/parallel_agent.py:1194
↓ 1 callersMethod_determine_datasets_successfully_tested
Determine which datasets are successfully tested based on VLM feedback
ai_scientist/treesearch/parallel_agent.py:835
↓ 1 callersMethod_draft
(self)
ai_scientist/treesearch/parallel_agent.py:453
↓ 1 callersMethod_gather_stage_metrics
Gather detailed metrics and analysis from the stage's nodes
ai_scientist/treesearch/agent_manager.py:1041
↓ 1 callersMethod_generate_ablation_idea
Generate the next ablation idea based on what's been done
ai_scientist/treesearch/parallel_agent.py:1860
↓ 1 callersMethod_generate_ablation_node
(self, parent_node: Node, ablation_idea: AblationIdea)
ai_scientist/treesearch/parallel_agent.py:605
↓ 1 callersMethod_generate_hyperparam_tuning_idea
Generate the next hyperparam tuning idea based on what's been done. This is minaly for Stage 2 (baseline tuning).
ai_scientist/treesearch/parallel_agent.py:1798
↓ 1 callersMethod_generate_hyperparam_tuning_node
( self, parent_node: Node, hyperparam_idea: HyperparamTuningIdea )
ai_scientist/treesearch/parallel_agent.py:557
↓ 1 callersMethod_generate_plotting_code
Generate code for plotting experiment results
ai_scientist/treesearch/parallel_agent.py:720
next →1–100 of 307, ranked by callers