MCPcopy Create free account

hub / github.com/FareedKhan-dev/ai-long-task / functions

Functions222 in github.com/FareedKhan-dev/ai-long-task

↓ 1 callersMethod_sample_from_archive_for_island
Sample a parent from the archive, preferring programs from the specified island Args: island_id: The island to prefer pr
data/database.py:1519
↓ 1 callersMethod_sample_from_island_random
Sample a completely random parent from a specific island (uniform distribution) Args: island_id: The island to sample fr
data/database.py:1488
↓ 1 callersMethod_sample_inspirations
Sample inspiration programs for the next evolution step. For proper island-based evolution, inspirations are sampled ONLY from the
data/database.py:1558
↓ 1 callersMethod_sample_parent
Sample a parent program from the current island for the next evolution step Returns: Parent program from current island
data/database.py:1276
↓ 1 callersMethod_save_best_program
Save the best program Args: program: Best program (if None, uses the tracked best program)
core/controller.py:626
↓ 1 callersMethod_save_checkpoint
Save a checkpoint Args: iteration: Current iteration number
core/controller.py:523
↓ 1 callersMethod_scale_feature_value_minmax
Helper for min-max scaling
data/database.py:2239
↓ 1 callersMethod_serialize_config
Serialize config object to a dictionary that can be pickled
core/process_parallel.py:404
↓ 1 callersMethod_serialize_feature_stats
Serialize feature_stats for JSON storage Returns: Dictionary that can be JSON-serialized
data/database.py:2254
↓ 1 callersMethod_setup_logging
Set up logging
core/controller.py:246
↓ 1 callersMethod_update_archive
Update the archive of elite programs Args: program: Program to consider for archive
data/database.py:1137
↓ 1 callersMethod_update_best_program
Update the absolute best program tracking Args: program: Program to consider as the new best
data/database.py:1184
↓ 1 callersMethod_update_diversity_reference_set
Update the reference set for diversity calculation
data/database.py:2111
↓ 1 callersMethod_update_island_best_program
Update the best program tracking for a specific island Args: program: Program to consider as the new best for the island
data/database.py:1224
↓ 1 callersMethod_update_stats
Update running statistics
data/evolution_trace.py:222
↓ 1 callersMethod_validate_cascade_configuration
Validate cascade evaluation configuration and warn about potential issues Args: module: The loaded evaluation module
evaluation/evaluator.py:122
↓ 1 callersMethod_validate_migration_results
Validate migration didn't create inconsistencies Checks that: 1. Program island metadata matches actual island assignment
data/database.py:1885
↓ 1 callersMethod_write_artifact_file
Write an artifact to a file
data/database.py:2489
↓ 1 callersFunctionappend_trace_jsonl
Append a single trace to a JSONL file, useful for streaming data. Args: trace: A single trace object. output_path: The path
utils/trace_export_utils.py:187
↓ 1 callersMethodcreate_task
Create and track a task that will run in the pool. Args: coro: The coroutine function to create a task for.
utils/async_utils.py:235
↓ 1 callersMethodevaluate_visually
Runs the code, takes a screenshot, and asks a multimodal model if it looks correct. Args: program_path: The file
evaluation/visual_evaluator.py:77
↓ 1 callersFunctionexport_traces_hdf5
Export traces to HDF5 format, which is efficient for large numerical datasets. Args: traces: A list of trace objects. output
utils/trace_export_utils.py:105
↓ 1 callersFunctionexport_traces_jsonl
Export traces to JSONL format (one JSON object per line). Args: traces: A list of trace objects that have a to_dict() method or are
utils/trace_export_utils.py:16
↓ 1 callersFunctionextract_code_language
Try to determine the programming language of a code snippet using simple heuristics. Args: code: The code snippet string. Retur
utils/code_utils.py:212
↓ 1 callersFunctionformat_improvement_safe
Safely calculates and formats the improvement (delta) between parent and child metrics for logging. Args: parent_metrics: A dictiona
utils/format_utils.py:43
↓ 1 callersMethodfrom_dict
Create a Config object from a dictionary.
config.py:419
↓ 1 callersMethodfrom_dict
Create from dictionary representation
data/database.py:102
↓ 1 callersMethodfrom_dict
Auto-wrap dict returns for backward compatibility
evaluation/result.py:36
↓ 1 callersMethodfrom_yaml
Load configuration from a YAML file.
config.py:412
↓ 1 callersMethodgenerate_all_with_context
Generate text using all available models and return a list of their responses
llm/ensemble.py:114
↓ 1 callersMethodgenerate_with_context
Generate text using a system message and conversational context
llm/ensemble.py:81
↓ 1 callersMethodget_artifact_size
Get size of a specific artifact in bytes
evaluation/result.py:56
↓ 1 callersMethodget_embedding
Computes the text embedding for a code string or a list of code strings. Args: code (Union[str, List[str]]): The code as
llm/embedding.py:87
↓ 1 callersMethodget_island_stats
Get statistics for each island
data/database.py:1977
↓ 1 callersMethodget_statistics
Get current tracing statistics
data/evolution_trace.py:273
↓ 1 callersMethodincrement_island_generation
Increment generation counter for an island
data/database.py:1773
↓ 1 callersFunctionload_traces_hdf5
Load traces and metadata from an HDF5 file. Args: input_path: The path to the HDF5 file. Returns: A tuple containing (l
utils/trace_export_utils.py:286
↓ 1 callersFunctionload_traces_json
Load traces and metadata from a single JSON file. Args: input_path: The path to the JSON file. Returns: A tuple contain
utils/trace_export_utils.py:262
↓ 1 callersFunctionload_traces_jsonl
Load traces from a JSONL file. Args: input_path: The path to the JSONL file. compress: If True, the file is assumed to be gz
utils/trace_export_utils.py:222
↓ 1 callersMethodlog_trace
Log an evolution trace entry Args: iteration: Current iteration number parent_program: Parent program object
data/evolution_trace.py:150
↓ 1 callersFunctionmain_async
Main asynchronous entry point for the command-line interface. Returns: An integer exit code (0 for success, 1 for failure).
cli.py:75
↓ 1 callersMethodmigrate_programs
Perform migration between islands This should be called periodically to share good solutions between islands
data/database.py:1784
↓ 1 callersFunctionparse_args
Parse command-line arguments
cli.py:21
↓ 1 callersMethodrebuild_models
Rebuild the models list, typically after CLI overrides change primary/secondary model fields.
config.py:214
↓ 1 callersMethodrequest_shutdown
Request graceful shutdown
core/process_parallel.py:487
↓ 1 callersMethodrun_evolution
Run evolution with process-based parallelism
core/process_parallel.py:517
↓ 1 callersMethodsample_from_island
Sample a program and inspirations from a specific island without modifying current_island This method is thread-safe and doesn't mod
data/database.py:409
↓ 1 callersFunctionsem_task
(task: asyncio.Future)
utils/async_utils.py:123
↓ 1 callersMethodshould_migrate
Check if migration should occur based on generation counters
data/database.py:1779
↓ 1 callersMethodstart
Start the process pool
core/process_parallel.py:442
↓ 1 callersMethodstop
Stop the process pool
core/process_parallel.py:477
↓ 1 callersMethodstore_artifacts
Store artifacts for a program Args: program_id: ID of the program artifacts: Dictionary of artifact name to
data/database.py:2335
Method__enter__
Context manager entry
data/evolution_trace.py:322
Method__exit__
Context manager exit
data/evolution_trace.py:326
Method__init__
Initializes the task pool with a concurrency limit.
utils/async_utils.py:203
Method__init__
( self, model_cfg: Optional[dict] = None, # Expects an object with attributes matching LLMMode
llm/openai.py:25
Method__init__
Initializes the LLM ensemble from a list of model configurations. Args: models_cfg: A list of LLMModelConfig objects, ea
llm/ensemble.py:25
Method__init__
Initialize the EmbeddingClient. Args: model_name (str): The embedding model name to use (e.g., 'text-embedding-3-small')
llm/embedding.py:47
Method__init__
(self, config: BrowserUseConfig)
core/researcher.py:35
Method__init__
( self, initial_program_path: str, evaluation_file: str, config: Config,
core/controller.py:103
Method__init__
( self, config: Config, evaluation_file: str, database: ProgramDatabase,
core/process_parallel.py:377
Method__init__
(self, config: DatabaseConfig)
data/database.py:127
Method__init__
Initialize the evolution tracer Args: output_path: Path to save trace data format: Output format ('jsonl', '
data/evolution_trace.py:85
Method__init__
( self, config: EvaluatorConfig, evaluation_file: str, llm_ensemble: Optional[
evaluation/evaluator.py:49
Method__init__
(self, config: ComputerUseConfig)
evaluation/visual_evaluator.py:34
Method__init__
Initializes the TemplateManager, loading default and custom templates.
prompts/templates.py:167
Method__init__
Initializes the prompt sampler with configuration.
prompts/sampler.py:27
Method__post_init__
Post-initialization to resolve ${VAR} env var references in api_key.
config.py:113
Method__post_init__
Post-initialization to set up model configurations and handle backward compatibility.
config.py:151
Method__repr__
Provide a concise string representation of the result.
api.py:31
Method_artifact_deserializer
JSON deserializer for artifacts that handles bytes
data/database.py:2428
Method_artifact_serializer
JSON serializer for artifacts that handles bytes
data/database.py:2422
Function_format_improvement
Safely format improvement metrics
core/controller.py:68
Function_format_metrics
Safely format metrics, handling both numeric and string values
core/controller.py:47
Method_invalidate_diversity_cache
Invalidate the diversity cache when programs change significantly
data/database.py:2166
Method_log_iteration
Log iteration progress Args: iteration: Iteration number parent: Parent program child: Child pro
core/controller.py:496
Function_run_iteration_worker
Run a single iteration in a worker process
core/process_parallel.py:183
Function_safe_avg_metrics
Safely calculate average of only numeric metric values
data/database.py:51
Function_safe_sum_metrics
Safely sum only numeric metric values, ignoring strings and other types
data/database.py:41
Method_take_screenshot
Captures the screen and returns it as a base64 encoded string. Uses pyautogui for cross-platform support.
evaluation/visual_evaluator.py:51
Function_worker_init
Initialize worker process with necessary components
core/process_parallel.py:71
Methodadd_fragment
Add or update a fragment at runtime.
prompts/templates.py:224
Methodadd_template
Add or update a template at runtime.
prompts/templates.py:220
Functioncalculate_edit_distance
Calculate the Levenshtein edit distance between two code snippets. This measures the number of single-character edits (insertions, deletions,
utils/code_utils.py:172
Methodcancel_all
Cancel all currently tracked tasks in the pool.
utils/async_utils.py:261
Methodevaluate_multiple
Evaluate multiple programs in parallel Args: programs: List of (program_code, program_id) tuples Returns:
evaluation/evaluator.py:768
Functionevaluator
(program_path)
api.py:298
Functionevolve_algorithm
Evolve an algorithm implemented as a class based on a benchmark function. Args: algorithm_class: The initial class to evolve.
api.py:348
Functionevolve_code
A general-purpose function to evolve an arbitrary code string with a custom evaluator. Args: initial_code: The initial code string t
api.py:410
Functionevolve_function
Evolve a specific Python function based on a set of test cases. Args: func: The initial function to evolve. test_cases: A li
api.py:258
Functionextract_evolution_trace_from_checkpoint
Extract evolution traces from an existing checkpoint directory Args: checkpoint_dir: Path to checkpoint directory output_pat
data/evolution_trace.py:331
Functionextract_full_lineage_traces
Extract complete evolution traces with full lineage chains and prompts/actions This function builds the complete evolution history for each
data/evolution_trace.py:435
Methodforce_exit_handler
(signum, frame)
core/controller.py:413
Functiongather_with_concurrency
Run a collection of tasks with a limit on how many can run concurrently. Args: n: The maximum number of tasks to run at the same tim
utils/async_utils.py:105
Methodgenerate
Generate text from a single prompt string. This is typically for completion-style models. Args: prompt (str): Th
llm/base.py:15
Methodgenerate
Generate text from a single prompt string
llm/openai.py:61
Methodgenerate_multiple
Generate multiple texts in parallel from the same prompt
llm/ensemble.py:100
Methodgenerate_with_context
Generate text using a system message and a list of conversational messages. This is for chat-based models that support roles (system,
llm/base.py:31
Methodget_artifact_keys
Get list of artifact keys
evaluation/result.py:51
Methodget_total_artifact_size
Get total size of all artifacts in bytes
evaluation/result.py:72
← previousnext →101–200 of 222, ranked by callers