Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/algorithmicsuperintelligence/openevolve
/ functions
Functions
1,478 in github.com/algorithmicsuperintelligence/openevolve
⨍
Functions
1,478
◇
Types & classes
176
↳
Endpoints
11
↓ 508 callers
Method
get
Get a program by ID Args: program_id: Program ID Returns: Program or None if not found
openevolve/database.py:370
↓ 192 callers
Method
add
Add a program to the database Args: program: Program to add iteration: Current iteration (defaults to last_i
openevolve/database.py:211
↓ 100 callers
Method
run
Run the evolution process with improved parallel processing Args: iterations: Maximum number of iterations (uses config
openevolve/controller.py:249
↓ 44 callers
Method
load
Load the database from disk Args: path: Path to load from
openevolve/database.py:639
↓ 34 callers
Method
from_dict
(cls, config_dict: Dict[str, Any])
openevolve/config.py:450
↓ 33 callers
Method
get_fragment
Get and format a fragment
openevolve/prompt/templates.py:223
↓ 26 callers
Method
_create_test_program
Helper to create a test program
tests/test_island_tracking.py:20
↓ 22 callers
Method
_create_test_program
Helper to create a test program JSON file
tests/test_evolution_trace.py:375
↓ 22 callers
Function
safe_float
Convert a value to float safely
examples/signal_processing/evaluator.py:37
↓ 21 callers
Method
sample_from_island
Simulate what _submit_iteration does
tests/test_concurrent_island_access.py:59
↓ 21 callers
Method
save
Save the database to disk Args: path: Path to save to (uses config.db_path if None) iteration: Current itera
openevolve/database.py:590
↓ 19 callers
Function
get_fitness_score
Calculate fitness score, excluding MAP-Elites feature dimensions This ensures that MAP-Elites features don't pollute the fitness calculation
openevolve/utils/metrics_utils.py:69
↓ 19 callers
Method
migrate_programs
Perform migration between islands This should be called periodically to share good solutions between islands
openevolve/database.py:1780
↓ 16 callers
Function
check_json_float
(v: Optional[float])
scripts/visualizer.py:100
↓ 15 callers
Method
close
Close the tracer and flush remaining data
openevolve/evolution_trace.py:271
↓ 14 callers
Function
showSidebar
()
scripts/static/js/sidebar.js:269
↓ 14 callers
Method
to_dict
(self)
openevolve/config.py:485
↓ 13 callers
Method
_calculate_feature_coords
Calculate feature coordinates for the MAP-Elites grid Args: program: Program to calculate features for Returns:
openevolve/database.py:834
↓ 13 callers
Method
_create_test_program
Helper to create a test program
tests/test_island_migration.py:22
↓ 13 callers
Method
evaluate_program
Mock evaluation that returns predictable metrics
tests/test_checkpoint_resume.py:27
↓ 13 callers
Function
read_file
(file_path: str)
examples/tsp_tour_minimization/utils/utils.py:46
↓ 12 callers
Method
_create_evaluator_file
Helper to create temporary evaluator file
tests/test_cascade_validation.py:31
↓ 12 callers
Method
_scale_feature_value
Scale a feature value according to the configured scaling method Args: feature_name: Name of the feature dimension
openevolve/database.py:2193
↓ 12 callers
Method
build_prompt
Build a prompt for the LLM Args: current_program: Current program code parent_program: Parent program from w
openevolve/prompt/sampler.py:51
↓ 12 callers
Function
setSelectedProgramId
(id)
scripts/static/js/main.js:260
↓ 12 callers
Function
showSidebarContent
(d, fromHover = false)
scripts/static/js/sidebar.js:280
↓ 11 callers
Method
_create_test_program
Helper to create a test program with specific features
tests/test_island_map_elites.py:26
↓ 11 callers
Function
extract_evolution_trace_from_checkpoint
Extract evolution traces from an existing checkpoint directory Args: checkpoint_dir: Path to checkpoint directory output_pat
openevolve/evolution_trace.py:320
↓ 11 callers
Method
get_artifacts
Retrieve all artifacts for a program Args: program_id: ID of the program Returns: Dictionary of art
openevolve/database.py:2379
↓ 11 callers
Function
get_failure_result
Returns a standardized dictionary for failure cases.
examples/sldbench/evaluator.py:34
↓ 11 callers
Method
get_template
Get a template by name
openevolve/prompt/templates.py:217
↓ 11 callers
Method
log_trace
Log an evolution trace entry Args: iteration: Current iteration number parent_program: Parent program object
openevolve/evolution_trace.py:133
↓ 11 callers
Method
sample
Sample a program and inspirations for the next evolution step Args: num_inspirations: Number of inspiration programs to
openevolve/database.py:382
↓ 10 callers
Method
_submit_iteration
Submit an iteration to the process pool, optionally pinned to a specific island
openevolve/process_parallel.py:796
↓ 10 callers
Function
default_for_none
(value: tp.Any, default: tp.Any)
examples/tsp_tour_minimization/utils/utils.py:19
↓ 10 callers
Method
flush
Write buffered traces to file
openevolve/evolution_trace.py:235
↓ 10 callers
Function
format_diff_summary
Create a human-readable summary of the diff. For multi-line blocks, shows the full search and replace content (all lines). Args:
openevolve/utils/code_utils.py:136
↓ 10 callers
Function
parse_code_block
(text: str, block_header: str)
examples/tsp_tour_minimization/utils/code_to_query.py:103
↓ 10 callers
Function
setSidebarSticky
(val)
scripts/static/js/sidebar.js:665
↓ 10 callers
Method
store_artifacts
Store artifacts for a program Args: program_id: ID of the program artifacts: Dictionary of artifact name to
openevolve/database.py:2332
↓ 9 callers
Function
$
(sel)
scripts/static/js/manual.js:1
↓ 9 callers
Method
_process_evaluation_result
Process evaluation result to handle both dict and EvaluationResult returns Args: result: Raw result from evaluation func
openevolve/evaluator.py:298
↓ 9 callers
Method
_update_feature_stats
Update statistics for a feature dimension Args: feature_name: Name of the feature dimension value: New value
openevolve/database.py:2169
↓ 9 callers
Method
from_yaml
Load configuration from a YAML file
openevolve/config.py:434
↓ 9 callers
Method
get_pending_artifacts
Get and clear pending artifacts for a program Args: program_id: Program ID Returns: Artifacts dicti
openevolve/evaluator.py:319
↓ 9 callers
Method
get_top_programs
Get the top N programs based on a metric Args: n: Number of programs to return metric: Metric to use for ran
openevolve/database.py:538
↓ 9 callers
Function
load_config
Load configuration from a YAML file or use defaults
openevolve/config.py:494
↓ 9 callers
Function
renderNodeList
(nodes)
scripts/static/js/list.js:6
↓ 8 callers
Method
_create_evaluator
Helper to create evaluator with given settings (shorter timeout for faster tests)
tests/test_evaluator_timeout.py:87
↓ 8 callers
Function
getNodeColor
(d)
scripts/static/js/graph.js:58
↓ 8 callers
Function
getNodeRadius
(d)
scripts/static/js/graph.js:69
↓ 8 callers
Method
rebuild_models
Rebuild the models list after primary_model/secondary_model field changes
openevolve/config.py:192
↓ 8 callers
Function
run_evolution
Run evolution with flexible inputs - the main library API Args: initial_program: Can be: - Path to a program file (str o
openevolve/api.py:33
↓ 8 callers
Function
selectProgram
(programId)
scripts/static/js/graph.js:97
↓ 7 callers
Method
_fast_code_diversity
Fast approximation of code diversity using simple metrics Returns diversity score (higher = more diverse)
openevolve/database.py:2042
↓ 7 callers
Function
getHighlightNodes
(nodes, filter, metric)
scripts/static/js/main.js:161
↓ 7 callers
Function
getSelectedMetric
()
scripts/static/js/main.js:183
↓ 7 callers
Method
get_best_program
Get the best program based on a metric Args: metric: Metric to use for ranking (uses combined_score or average if None)
openevolve/database.py:472
↓ 7 callers
Function
safe_numeric_average
Calculate the average of numeric values in a metrics dictionary, safely ignoring non-numeric values like strings. Args: metrics:
openevolve/utils/metrics_utils.py:8
↓ 7 callers
Function
sanitize_program_for_visualization
(program: dict[str, Any])
scripts/visualizer.py:91
↓ 7 callers
Function
updateResizerPosition
()
scripts/static/js/sidebar.js:81
↓ 6 callers
Method
_bulletproof_execute_with_gpu_protection
Execute function with maximum GPU and Metal kernel protection
examples/mlx_metal_kernel_opt/evaluator.py:426
↓ 6 callers
Method
_calculate_complexity_bin
Calculate the bin index for a given complexity value using feature scaling. Args: complexity: The complexity value (code
openevolve/database.py:902
↓ 6 callers
Method
_create_comprehensive_failure_result
Create comprehensive failure result with full error statistics
examples/mlx_metal_kernel_opt/evaluator.py:1406
↓ 6 callers
Method
_create_test_program
Helper to create a test program
tests/test_migration_no_duplicates.py:29
↓ 6 callers
Function
_format_block_lines
Format a block of lines for diff summary: show all lines (truncated per line, optional cap).
openevolve/utils/code_utils.py:123
↓ 6 callers
Function
_prepare_evaluator
Convert evaluator input to a file path
openevolve/api.py:237
↓ 6 callers
Function
color
(s, c)
examples/online_judge_programming/submit.py:376
↓ 6 callers
Function
create_dir
(dir_path: str)
examples/tsp_tour_minimization/utils/utils.py:24
↓ 6 callers
Method
evaluate_program
Evaluate a program and return scores Args: program_code: Code to evaluate program_id: Optional ID for loggin
openevolve/evaluator.py:132
↓ 6 callers
Function
hideSidebar
()
scripts/static/js/sidebar.js:274
↓ 6 callers
Function
renderMetricBar
(value, min, max, opts={})
scripts/static/js/main.js:57
↓ 6 callers
Function
safe_float
Convert a value to float safely
examples/function_minimization/evaluator.py:36
↓ 6 callers
Function
scrollAndSelectNodeById
(nodeId)
scripts/static/js/graph.js:6
↓ 6 callers
Function
selectListNodeById
(id)
scripts/static/js/list.js:175
↓ 6 callers
Function
updatePerformanceGraph
(nodes, options = {})
scripts/static/js/performance.js:303
↓ 5 callers
Method
_calculate_diversity_bin
Calculate the bin index for a given diversity value using feature scaling. Args: diversity: The average fast code divers
openevolve/database.py:929
↓ 5 callers
Method
_determine_program_type
Determine the type/category of an inspiration program Args: program: Program dictionary Returns: St
openevolve/prompt/sampler.py:501
↓ 5 callers
Method
_direct_evaluate
Directly evaluate a program using the evaluation function with timeout Args: program_path: Path to the program file
openevolve/evaluator.py:331
↓ 5 callers
Method
_ensure_clean_gpu_state
Ensure clean GPU state before operations
examples/mlx_metal_kernel_opt/evaluator.py:911
↓ 5 callers
Function
_prepare_program
Convert program input to a file path
openevolve/api.py:202
↓ 5 callers
Method
_render_artifacts
Render artifacts for prompt inclusion Args: artifacts: Dictionary of artifact name to content Returns:
openevolve/prompt/sampler.py:607
↓ 5 callers
Function
_resolve_env_var
Resolve ${VAR} environment variable reference in a string value. In current implementation pattern must match the entire string (e.g., "${OPE
openevolve/config.py:21
↓ 5 callers
Method
_safe_calculate_improvement
Safely calculate percentage improvement with bounds
examples/mlx_metal_kernel_opt/evaluator.py:1209
↓ 5 callers
Method
_sample_random_parent
Sample a completely random parent from all programs
openevolve/database.py:1416
↓ 5 callers
Method
create_benchmark_configs
Create comprehensive benchmark configurations
examples/mlx_metal_kernel_opt/qwen3_benchmark_suite.py:68
↓ 5 callers
Function
format_metrics_safe
Safely format metrics dictionary for logging, handling both numeric and string values. Args: metrics: Dictionary of metric names to
openevolve/utils/format_utils.py:8
↓ 5 callers
Method
generate_with_context
Generate text using a system message and conversational context
openevolve/llm/openai.py:108
↓ 5 callers
Method
has_artifacts
Check if this result contains any artifacts
openevolve/evaluation_result.py:39
↓ 5 callers
Method
log_island_status
Log current status of all islands
openevolve/database.py:2311
↓ 5 callers
Method
run_single_benchmark
Run a single benchmark configuration with proper warmup
examples/mlx_metal_kernel_opt/qwen3_benchmark_suite.py:558
↓ 4 callers
Function
_create_error_return
(error_message: str)
examples/symbolic_regression/eval.py:164
↓ 4 callers
Method
_deserialize_feature_stats
Deserialize feature_stats from loaded JSON Args: stats_dict: Dictionary loaded from JSON Returns: P
openevolve/database.py:2279
↓ 4 callers
Method
_feature_coords_to_key
Convert feature coordinates to a string key Args: coords: Feature coordinates Returns: String key
openevolve/database.py:956
↓ 4 callers
Method
_format_inspirations_section
Format the inspirations section for the prompt Args: inspirations: List of inspiration programs language: Pr
openevolve/prompt/sampler.py:441
↓ 4 callers
Method
_get_cached_diversity
Get diversity score for a program using cache and reference set Args: program: The program to calculate diversity for
openevolve/database.py:2070
↓ 4 callers
Function
_get_library_test_config
Get config for library API tests with optillm server
tests/integration/test_library_api.py:15
↓ 4 callers
Method
_is_better
Determine if program1 has better FITNESS than program2 Uses fitness calculation that excludes MAP-Elites feature dimensions
openevolve/database.py:1101
↓ 4 callers
Method
_safe_decode_artifact
Safely decode an artifact value to string Args: value: Artifact value (string or bytes) Returns: St
openevolve/prompt/sampler.py:636
↓ 4 callers
Method
_sample_model
Sample a model from the ensemble based on weights
openevolve/llm/ensemble.py:70
next →
1–100 of 1,478, ranked by callers