MCPcopy Create free account

hub / github.com/CLAIRE-Labo/EvoTune / functions

Functions159 in github.com/CLAIRE-Labo/EvoTune

↓ 22 callersMethodjoin
A convenience method to join the underlying process. Returns True if the process ended, False if still alive after timeout.
src/packing/parallel/stoppable_task.py:215
↓ 12 callersMethodget
(self, name)
src/packing/evaluate/registry.py:18
↓ 9 callersMethodis_alive
Thread-safe check for process status.
src/packing/parallel/stoppable_task.py:226
↓ 7 callersMethodstop
Stops the process, cancels the timer, stops the memory watcher, and cleans up the queue. Only executes once per task. Subsequ
src/packing/parallel/stoppable_task.py:163
↓ 5 callersFunctionwrite_to_json
(json_file, data)
src/packing/logging/logging.py:390
↓ 4 callersFunctionevaluate_func
Evaluates the heuristic function on a set of FlatPack instances. Args: cfg: The OmegaConf config dataset_name: Path to
src/packing/evaluate/flat_pack/task_flat_pack.py:188
↓ 4 callersFunctionfunction_to_string
Takes a function and returns its source code as a string. args: func (function): The function whose source code is to be extracted.
src/packing/utils/functions.py:5
↓ 4 callersFunctiongenerate_input
Generates a FlatPack environment instance from a dataset. Args: cfg: The OmegaConfig set: The dataset name Retur
src/packing/evaluate/flat_pack/task_flat_pack.py:104
↓ 4 callersMethodrun
(self)
src/packing/parallel/memory_watcher.py:22
↓ 3 callersFunction_local_search
(distmat, cur_tour, fixed_i=0, count=1000)
src/packing/evaluate/tsp/task_tsp.py:165
↓ 3 callersFunctionconsumers_finish_and_cleanup
Wait for all consumers to finish, collect the results, and clean up.
src/packing/parallel/continuous_execution.py:415
↓ 3 callersFunctiongenerate_input
(cfg, set)
src/packing/evaluate/tsp/task_tsp.py:47
↓ 3 callersFunctioninitialize_single_model
Initialize a single Huggingface model for training or inference.
src/packing/model/model.py:55
↓ 3 callersMethodregister
(self, name, generate_input, evaluate_func, get_initial_func, system_prompt, append_prompt)
src/packing/evaluate/registry.py:9
↓ 2 callersFunctionEvalProducer
Producer process that takes functions from the programdatabase and evaluates them on the new input
src/packing/parallel/continuous_execution.py:447
↓ 2 callersMethod__setattr__
(self, name, value)
src/packing/logging/function_class.py:39
↓ 2 callersFunction_calculate_cost
(distmat, tour)
src/packing/evaluate/tsp/task_tsp.py:157
↓ 2 callersMethod_register_program_in_island
Registers `program` in the specified island.
src/packing/funsearch/programs_database.py:79
↓ 2 callersFunction_softmax
Returns the tempered softmax of 1D finite `logits`.
src/packing/funsearch/programs_database.py:32
↓ 2 callersFunctioncalculate_cost
(inst: TSPInstance, path: np.ndarray)
src/packing/evaluate/tsp/tsp_generate_dataset.py:96
↓ 2 callersFunctionclean_up_gpu_mem
()
src/packing/model/model.py:706
↓ 2 callersFunctionevaluate_func
(cfg, dataset_name, function_class)
src/packing/evaluate/bin_packing/task_bin.py:121
↓ 2 callersFunctionextract_functions
Extracts the outer function definition from the given code output, including any nested functions within it. Parameters: code_output
src/packing/utils/functions.py:81
↓ 2 callersFunctionextract_imports
Extracts the import statements from the given code output. Parameters: code_output (str): The output string containing the code. Re
src/packing/utils/functions.py:55
↓ 2 callersFunctiongenerate_functions
Generate functions for a given prompt and wrap them in FunctionClass object.
src/packing/parallel/continuous_execution.py:64
↓ 2 callersFunctiongenerate_input
(cfg, set)
src/packing/evaluate/bin_packing/task_bin.py:84
↓ 2 callersFunctiongenerate_on_gpu
(chat, model, tokenizer, sampling_params, gpu_num, load_finetuned)
src/packing/model/model.py:165
↓ 2 callersFunctionget_name
(name)
src/packing/model/model.py:38
↓ 2 callersFunctionget_pd_statistics
(cfg, programdatabase, running_dict, round_num)
src/packing/logging/logging.py:211
↓ 2 callersMethodget_prompt
Constructs a prompt containing functions from this island.
src/packing/funsearch/programs_database.py:188
↓ 2 callersMethodget_result
Non-blocking retrieval of whatever was put into the queue. Returns the item if available, or None if the queue is empty.
src/packing/parallel/stoppable_task.py:269
↓ 2 callersFunctioninitialize_models
Initialize the inference model, tokenizer, and sampling parameters for the model(s) specified in the config file.
src/packing/model/model.py:118
↓ 2 callersFunctioninitialize_models_server
(cfg, load_finetuned, use_vllm=False)
src/packing/model/model.py:519
↓ 2 callersFunctionlaunch_accelerate
( cfg, running_dict, model_name,
src/experiments/main.py:439
↓ 2 callersFunctionload_dataset
(fp, drop_rate)
src/packing/evaluate/tsp/tsp_generate_dataset.py:89
↓ 2 callersFunctionlog_to_wandb
(function_class_instance, running_dict, prefix="")
src/packing/logging/logging.py:29
↓ 2 callersMethodregister_program
Stores a program on this island, in its appropriate cluster.
src/packing/funsearch/programs_database.py:175
↓ 2 callersFunctionsave_func_class_to_file
(cfg, result_function_class: FunctionClass, filename="best_programs.txt")
src/packing/logging/log_to_file.py:36
↓ 2 callersFunctionseed_everything
Seed all random generators.
src/packing/utils/seeding.py:13
↓ 2 callersFunctionstart_tgi_server
(model_id, gpu_num, port)
src/packing/model/model.py:579
↓ 2 callersFunctionstart_vllm_server
Starts a vLLM server with OpenAI-compatible API, assigning the specified GPU. Refer to vLLM docs for additional flags/options: https://do
src/packing/model/model.py:590
↓ 2 callersFunctionwait_for_tgi_server
(port, model_id, timeout=1000)
src/packing/model/model.py:640
↓ 2 callersFunctionwait_for_vllm_server
Waits for the vLLM server to become ready at http://localhost:<port>/v1/chat/completions by sending minimal requests. Retries until timeout.
src/packing/model/model.py:656
↓ 2 callersFunctionwandb_log_running_dict
(running_dict)
src/packing/logging/logging.py:16
↓ 2 callersFunctionwrite_chat_to_file
(cfg, running_dict, function_class: FunctionClass, folder_name="chats")
src/packing/logging/log_to_file.py:62
↓ 2 callersFunctionwrite_to_json
(json_file, data)
src/packing/parallel/continuous_execution.py:829
↓ 1 callersFunctionDPO
( cfg, running_dict, dpo_chats, score_threshold, model, tokeni
src/packing/train/dpo/dpo.py:29
↓ 1 callersFunction_add_block_in_middle
(matrix, a, b, block_value)
src/packing/evaluate/flat_pack/generate_perturbed_instances.py:8
↓ 1 callersFunction_convert
(obj)
src/packing/logging/log_to_file.py:11
↓ 1 callersFunction_guided_local_search
( distmat, guide, start, perturbation_moves=30, iter_limit=1000 )
src/packing/evaluate/tsp/task_tsp.py:235
↓ 1 callersFunction_init_nearest_neighbor
(distmat, start)
src/packing/evaluate/tsp/task_tsp.py:216
↓ 1 callersFunction_perturbation
(distmat, guide, penalty, cur_tour, k, perturbation_moves=30)
src/packing/evaluate/tsp/task_tsp.py:179
↓ 1 callersFunction_relocate_once
(distmat, tour, fixed_i=0)
src/packing/evaluate/tsp/task_tsp.py:127
↓ 1 callersFunction_two_opt_once
in-place operation
src/packing/evaluate/tsp/task_tsp.py:102
↓ 1 callersMethodadd_batch_data
(self, cfg, passed_function_classes, failed_function_classes)
src/packing/train/dpo/dpo_dataset.py:130
↓ 1 callersMethodadd_chat
(self, chosen_conv, rejected_conv, chosen_chat_score)
src/packing/train/dpo/dpo_dataset.py:95
↓ 1 callersFunctioncalculate_avg_passed_score
(running_dict, passed_function_classes)
src/packing/logging/logging.py:337
↓ 1 callersFunctioncalculate_avg_score
(running_dict, passed_function_classes, failed_function_classes)
src/packing/logging/logging.py:351
↓ 1 callersFunctioncalculate_dataset_statistics
(cfg, running_dict, scores, scores_since_tuning, algo)
src/packing/utils/dataset_utils.py:5
↓ 1 callersMethodconstruct_and_add_pairs
(self, cfg, passed_classes_previous, failed_classes_previous)
src/packing/train/dpo/dpo_dataset.py:18
↓ 1 callersFunctiondelete_sampling_model
(cfg, model, tokenizer, sampling_params)
src/packing/model/model.py:734
↓ 1 callersFunctiondict_to_namespace
Recursively convert a dict (and any nested dicts/lists) into SimpleNamespace objects.
src/packing/utils/vllm.py:4
↓ 1 callersFunctionevaluate
(function_from_llm, dataset_struct, iter_limit_map)
src/packing/evaluate/tsp/task_tsp.py:278
↓ 1 callersFunctionevaluate_flatpack_instance
Runs one episode of the FlatPack simulation using the given heuristic function. Args: env: An instance of the FlatPack environme
src/packing/evaluate/flat_pack/task_flat_pack.py:128
↓ 1 callersFunctionevaluate_func
(cfg, dataset_config, function_class)
src/packing/evaluate/tsp/task_tsp.py:345
↓ 1 callersFunctionevaluate_on_evalset
( cfg, running_dict, round_num, evaluate_func, programdatabase, evalset, generate_input )
src/packing/parallel/continuous_execution.py:500
↓ 1 callersFunctionflatten
(prefix, obj)
src/packing/logging/logging.py:48
↓ 1 callersFunctiongenerate_batch_prompts
Generates cfg.num_cont_rounds prompts that will be used by the producer.
src/packing/model/prompt.py:70
↓ 1 callersFunctiongenerate_dataset
(filepath, n, batch_size=64, drop_rate=0.0)
src/packing/evaluate/tsp/tsp_generate_dataset.py:56
↓ 1 callersFunctiongenerate_datasets
(basepath=None, drop_rate=0.0)
src/packing/evaluate/tsp/tsp_generate_dataset.py:74
↓ 1 callersFunctiongenerate_from_server
(cfg, chat, flag_load_finetuned, server_port, num_outputs_per_prompt)
src/packing/model/model.py:349
↓ 1 callersFunctiongenerate_instance
Generates a random FlatPack instance. Args: num_row_blocks: Number of rows in the grid. num_col_blocks: Number of colum
src/packing/evaluate/flat_pack/generate_instances.py:11
↓ 1 callersFunctiongenerate_prompt
Generates a single prompt.
src/packing/model/prompt.py:54
↓ 1 callersMethodget_best_score_per_island
(self, island_id)
src/packing/funsearch/programs_database.py:146
↓ 1 callersMethodget_dataset_above_threshold
(self, threshold)
src/packing/train/dpo/dpo_dataset.py:166
↓ 1 callersFunctionget_full_model_name
(cfg)
src/packing/model/model.py:37
↓ 1 callersMethodget_highest_score
(self)
src/packing/train/dpo/dpo_dataset.py:190
↓ 1 callersFunctionget_initial_func
Returns the initial heuristic function and its name based on the configuration. Args: cfg: Configuration object with attribute '
src/packing/evaluate/flat_pack/task_flat_pack.py:20
↓ 1 callersFunctionget_initial_func
(cfg)
src/packing/evaluate/tsp/task_tsp.py:59
↓ 1 callersFunctionget_outputs
Routs the generation request to the appropriate function based on the number of models.
src/packing/model/model.py:481
↓ 1 callersFunctionget_outputs_from_multiple_models
( cfg, chat, models_list, tokenizers_list, sampling_params_list, load_finetuned )
src/packing/model/model.py:232
↓ 1 callersFunctionget_outputs_from_multiple_models_server
(cfg, chat, server_ports, flag_load_finetuned)
src/packing/model/model.py:413
↓ 1 callersFunctionget_outputs_from_single_model
(cfg, chat, model, tokenizer, sampling_params, load_finetuned)
src/packing/model/model.py:212
↓ 1 callersFunctionget_outputs_from_single_model_server
(cfg, chat, server_ports, flag_load_finetuned)
src/packing/model/model.py:391
↓ 1 callersFunctionget_valid_bin_indices
Returns indices of bins in which item can fit.
src/packing/evaluate/bin_packing/task_bin.py:102
↓ 1 callersFunctionguided_local_search
( distmat: FloatArray, guide: FloatArray, perturbation_moves: int = 30, iter_l
src/packing/evaluate/tsp/task_tsp.py:255
↓ 1 callersFunctionheuristics
(distance_matrix)
src/packing/evaluate/tsp/task_tsp.py:61
↓ 1 callersFunctionimport_all_tasks
()
src/packing/evaluate/__init__.py:5
↓ 1 callersFunctioninitialize_running_dict
(cfg, input_struct)
src/packing/logging/logging.py:119
↓ 1 callersFunctionis_loggable
(value)
src/packing/logging/logging.py:61
↓ 1 callersFunctionis_memory_error
Checks if an exception is a memory-related error.
src/packing/parallel/continuous_execution.py:44
↓ 1 callersMethodis_timed_out
(self)
src/packing/parallel/stoppable_task.py:231
↓ 1 callersFunctionkill_process_with_pid_and_wait
(pid)
src/packing/model/model.py:620
↓ 1 callersFunctionl1_bound
Computes L1 lower bound on OPT for bin packing. Args: items: Tuple of items to pack into bins. capacity: Capacity of bins. Retur
src/packing/evaluate/bin_packing/task_bin.py:48
↓ 1 callersFunctionl1_bound_dataset
Computes the mean L1 lower bound across a dataset of bin packing instances. Args: instances: Dictionary containing a set of bin packing i
src/packing/evaluate/bin_packing/task_bin.py:61
↓ 1 callersFunctionlearning_rate_schedule
(cfg, lr, num_datapoints, tuning_loop, round_num)
src/packing/model/learning_rate.py:3
↓ 1 callersFunctionload_from_logsdir
(logs_dir)
src/packing/logging/log_to_file.py:117
↓ 1 callersFunctionload_from_logsdir_eval
(logs_dir)
src/packing/logging/log_to_file.py:137
↓ 1 callersFunctionlog_train_keys_containing_loop
(cfg, running_dict)
src/packing/logging/logging.py:81
↓ 1 callersFunctionmain
(cfg)
src/experiments/eval.py:36
next →1–100 of 159, ranked by callers