MCPcopy Create free account

hub / github.com/Continual-Intelligence/SEAL / functions

Functions359 in github.com/Continual-Intelligence/SEAL

↓ 61 callersMethodencode
(self, task: Task, **kwargs)
few-shot/arclib/messagers.py:147
↓ 33 callersMethodencode
(self, grid: Grid)
few-shot/arclib/representers.py:74
↓ 27 callersMethoddecode
(self, encoded_str: str, **kwargs)
few-shot/arclib/representers.py:78
↓ 16 callersMethodapply_to_task
(self, task: Task, rng: RandomState = None, share_rng=False, **kwargs)
few-shot/arclib/augmenters.py:722
↓ 13 callersFunctionto_tuple
(arr)
few-shot/arclib/arc.py:22
↓ 11 callersFunctionread_tasks_from_single_file
Read tasks from a single file
few-shot/arclib/arc.py:202
↓ 11 callersFunctionto_list
(arr)
few-shot/arclib/arc.py:26
↓ 6 callersMethodread_tasks_from_dict
(cls, data: dict, test: bool = False)
few-shot/arclib/arc.py:149
↓ 5 callersFunctionevaluate
( data_file: str, solution_file: str, submission_file: str, task_info_file: Optional[str] = None, mistakes
few-shot/arclib/eval.py:74
↓ 5 callersFunctionmake_submission
Make a submission
few-shot/arclib/arc.py:239
↓ 5 callersFunctionplot_the_mistake
(task, preds, save_folder, postfix="")
few-shot/arclib/eval.py:22
↓ 5 callersFunctionvote
(outputs)
few-shot/arclib/voting.py:72
↓ 4 callersFunction_banner
(msg: str)
general-knowledge/src/continual/continual_self_edits.py:62
↓ 4 callersFunction_to_int_clamped
(x: str, lo: int = 1, hi: int = 5)
general-knowledge/src/utils.py:267
↓ 4 callersMethodapply_to_example
( self, example: Example, rng: RandomState = None, to_input: bool = True,
few-shot/arclib/augmenters.py:727
↓ 4 callersFunctionbuild_train_sequences
Turn a raw completion + article context into the list of sequences that the inner-loop fine-tuning consumes. - `---` splits into separat
general-knowledge/src/utils.py:193
↓ 4 callersFunctionformat_grade_prompts
( q_batch: List[Dict[str, str]], preds: List[str] )
general-knowledge/src/utils.py:114
↓ 4 callersFunctionget_preprocessed_tasks
( tasks: List[Task], tokenizer: Any, formatters: List, max_tokens: int = 8192, include_n:
few-shot/inference/preprocess.py:155
↓ 4 callersFunctiongrade_with_gpt4
Take already-formatted grading prompts, send each to GPT-4.1, and return the yes/no verdicts as booleans.
general-knowledge/src/utils.py:153
↓ 4 callersMethodparse_position
(self, pos)
few-shot/arclib/representers.py:370
↓ 4 callersMethodto_spreadsheet
(self, i: int, j: int)
few-shot/arclib/representers.py:253
↓ 3 callersFunction_api
(endpoint: str, payload: Dict[str, Any], timeout: int = 300)
general-knowledge/src/utils.py:70
↓ 3 callersFunction_generate_bulk
Call a vLLM /v1/completions endpoint once with a list of prompts. Returns completions in the original order.
general-knowledge/src/data_generation/make_squad_data_entigraph.py:77
↓ 3 callersFunctionaccuracy
(task, attempts)
few-shot/arclib/eval.py:54
↓ 3 callersMethodapply_to_grid
(self, grid: Grid, rng: RandomState = None)
few-shot/arclib/augmenters.py:46
↓ 3 callersFunctionformat_answer_prompts
(q_batch: List[Dict[str, str]], instruct_model: bool, chain_of_thought: bool = False)
general-knowledge/src/utils.py:106
↓ 3 callersFunctionmake_prompt
(title: str, context: str, instruct_model: bool, prompt_key: str)
general-knowledge/src/data_generation/make_squad_data.py:70
↓ 3 callersMethodmax_height
(self)
few-shot/arclib/arc.py:100
↓ 3 callersMethodmax_width
(self)
few-shot/arclib/arc.py:114
↓ 3 callersFunctionset_vllm_api_url
Initialize the base URL for vLLM API calls.
general-knowledge/src/utils.py:63
↓ 2 callersFunction_apply_stops
(text: str, stop: List[str])
general-knowledge/src/query/CPT_GA.py:73
↓ 2 callersFunction_client
Return a singleton OpenAI client (reads OPENAI_API_KEY from env).
general-knowledge/src/utils.py:146
↓ 2 callersFunction_connect_zmq
(port: int)
general-knowledge/src/continual/continual_self_edits.py:130
↓ 2 callersFunction_eval_with_vllm_engine
( llm: LLM, questions: List[Dict[str, str]], *, instruct_model: bool, temperature: float,
general-knowledge/src/query/CPT_fullFT.py:51
↓ 2 callersFunction_grade
(questions: List[Dict[str, str]], preds: List[str])
general-knowledge/src/inner/GA_server.py:95
↓ 2 callersFunction_grade_accuracy
(questions: List[Dict[str, str]], preds: List[str])
general-knowledge/src/query/CPT_GA.py:139
↓ 2 callersFunction_make_hash_key
This approach cares about the order of keyword arguments (that is, f(arr=a, order="c") will be cached separately from f(order="c", arr=a) Thi
few-shot/utils/np_cache.py:143
↓ 2 callersFunction_send_round
(sock, train_seqs: List[str], questions: List[Dict[str, str]], args)
general-knowledge/src/continual/continual_self_edits.py:137
↓ 2 callersFunction_spawn_inner_server
(vllm_api: str, model: str, zmq_port: int, gpu: str, log_dir: Path, tag: str)
general-knowledge/src/continual/continual_self_edits.py:108
↓ 2 callersFunction_spawn_vllm
Launch vLLM (LoRA-enabled) and wait for /health.
general-knowledge/src/continual/continual_self_edits.py:67
↓ 2 callersFunctionaccuracy_and_texts
( questions: List[Dict[str, str]], answer_model_ref: str, sampling: Dict[str, Any], stop_ids:
general-knowledge/src/inner/TTT_server.py:67
↓ 2 callersMethodapply_to_example
( self, example: Example, rng: RandomState = None, to_input: bool = True,
few-shot/arclib/augmenters.py:49
↓ 2 callersMethodapply_to_grid
(self, grid: Grid, rng: RandomState = None)
few-shot/arclib/augmenters.py:326
↓ 2 callersMethodcolor_mapper
(color: int)
few-shot/arclib/augmenters.py:167
↓ 2 callersFunctioncompute_average_matrix
(matrices)
general-knowledge/src/continual/average_results.py:58
↓ 2 callersMethoddisplay
(self, messages: MESSAGES)
few-shot/arclib/messagers.py:150
↓ 2 callersFunctionfind_connected_components
( grid: Grid, background_color: Optional[int] = None )
few-shot/arclib/augmenters.py:583
↓ 2 callersFunctionget_all_type_of_votingsv2
(outputs, row_first=True)
few-shot/arclib/voting.py:37
↓ 2 callersFunctionget_augmenters
( include_basic: bool = True, include_size: bool = True, include_chain: bool = True, include_r
few-shot/self-edit.py:144
↓ 2 callersFunctionget_formatted_test_tasks
( task: Task, formatters: Any, tokenizer: Any, include_n: List[int] = [0, 1], permute_n: int = 2 )
few-shot/inference/preprocess.py:118
↓ 2 callersFunctionget_sampling_params
( tokenizer: PreTrainedTokenizer, num_tokens: int, max_tokens: int, temperature: float = 0.0,
few-shot/inference/engine_no_lora.py:8
↓ 2 callersFunctionget_sampling_params
( tokenizer: PreTrainedTokenizer, num_tokens: int, max_tokens: int, temperature: float = 0.0,
few-shot/inference/engine.py:8
↓ 2 callersFunctioninitialize_engine
Initialize the LLMEngine.
few-shot/inference/engine_no_lora.py:26
↓ 2 callersFunctioninitialize_engine
Initialize the LLMEngine.
few-shot/inference/engine.py:26
↓ 2 callersFunctionmake_prompt
Render the user prompt for a given prompt_key.
general-knowledge/src/data_generation/make_squad_data_openai.py:69
↓ 2 callersFunctionparse_yes_no
Return True for yes, False for no or ambiguous responses.
general-knowledge/src/utils.py:182
↓ 2 callersFunctionprocess_requests
Continuously process a list of prompts and handle the outputs.
few-shot/inference/engine_no_lora.py:50
↓ 2 callersFunctionprocess_requests
Continuously process a list of prompts and handle the outputs.
few-shot/inference/engine.py:52
↓ 2 callersFunctionrow_base_majority_voting
(outputs, transpose=False)
few-shot/arclib/voting.py:13
↓ 2 callersMethodto_spreadsheet_with_dots
(self, rows_cols: List[Tuple[int, int]])
few-shot/arclib/representers.py:261
↓ 2 callersMethodupdate_model
Update the model using the provided task by: 1. Reset LoRA weights 2. Create training data from the task 3. Train the
few-shot/arclib/update_model.py:74
↓ 1 callersMethod__repr__
(self)
few-shot/arclib/augmenters.py:199
↓ 1 callersFunction_answers_with_ga
( model, tokenizer, lora_weights: Dict[str, Any], questions: List[Dict[str, str]], max_new
general-knowledge/src/inner/GA_server.py:111
↓ 1 callersFunction_baseline_answers
( model, tokenizer, questions: List[Dict[str, str]], max_new_tokens: int, temperature: flo
general-knowledge/src/query/CPT_GA.py:82
↓ 1 callersFunction_chat_generate_baseline
Baseline generation w/o GA weights using standard HF generate. Uses chat template when available; falls back to plain text.
general-knowledge/src/inner/GA_server.py:67
↓ 1 callersFunction_entities_prompt
(document: str)
general-knowledge/src/data_generation/make_squad_data_entigraph.py:112
↓ 1 callersFunction_ga_answers
( model, tokenizer, lora_weights: Dict[str, Any], questions: List[Dict[str, str]], max_new
general-knowledge/src/query/CPT_GA.py:110
↓ 1 callersFunction_grade_accuracy
( questions: List[Dict[str, str]], preds: List[str] )
general-knowledge/src/query/CPT_fullFT.py:41
↓ 1 callersFunction_merge_lora
Merge adapter_path into base_path and save to out_dir (returns str).
general-knowledge/src/continual/continual_self_edits.py:158
↓ 1 callersFunction_pair_prompt
(document: str, e1: str, e2: str)
general-knowledge/src/data_generation/make_squad_data_entigraph.py:115
↓ 1 callersFunction_parse_args
()
general-knowledge/src/EM/build_SFT_dataset.py:33
↓ 1 callersFunction_parse_entities
Very forgiving JSON list extractor. Looks for a JSON field "entities". Returns up to 10 canonical entity strings.
general-knowledge/src/data_generation/make_squad_data_entigraph.py:129
↓ 1 callersFunction_row
(seq: str)
general-knowledge/src/query/CPT_fullFT.py:236
↓ 1 callersFunction_split_segments
(text: str)
general-knowledge/src/utils.py:188
↓ 1 callersFunction_tokenize_and_process
Tokenize text and set up labels for instruction fine-tuning. Specifically looks for assistant header token sequence to identify the response
few-shot/ttt.py:205
↓ 1 callersFunction_tokenize_and_process
Tokenize text and set up labels for instruction fine-tuning. Specifically looks for assistant header token sequence to identify the response
few-shot/self-edit.py:222
↓ 1 callersMethod_tokenize_and_process
Tokenize a list of texts and set up labels for instruction fine-tuning. Specifically looks for the second-to-last occurrence of the a
few-shot/arclib/update_model.py:142
↓ 1 callersFunction_top_k
return the text of the top-k completions by adapter_mean
general-knowledge/src/EM/build_SFT_dataset.py:20
↓ 1 callersMethod_train_model
Train the model using the provided text examples. Args: text_list: List of formatted training examples
few-shot/arclib/update_model.py:197
↓ 1 callersFunction_triple_prompt
(document: str, e1: str, e2: str, e3: str)
general-knowledge/src/data_generation/make_squad_data_entigraph.py:121
↓ 1 callersFunctionapply_a_random_augmentation
(task: Task, rng=None)
few-shot/arclib/augmenters.py:896
↓ 1 callersFunctionbatch
Batch data into iterators of length n. The last batch may be shorter.
few-shot/utils/lm_api.py:108
↓ 1 callersFunctionbuild_proxy_prompt
(title: str, context: str, completion: str)
general-knowledge/src/utils.py:264
↓ 1 callersFunctionclient
()
general-knowledge/src/data_generation/make_squad_data_openai.py:62
↓ 1 callersMethodcolor_mapper
(color: int)
few-shot/arclib/augmenters.py:190
↓ 1 callersMethodcolor_mapper
(color: int)
few-shot/arclib/augmenters.py:284
↓ 1 callersFunctioncompare
(data_file: str, solution_file: str, submission_1_file: str, submission_2_file: str, plot_differents: bool = F
few-shot/arclib/eval.py:151
↓ 1 callersFunctioncreate_dataset
(training_data)
few-shot/BC-self-edit.py:82
↓ 1 callersMethoddeserialize
(cls, data: dict, test: bool = False)
few-shot/arclib/arc.py:142
↓ 1 callersMethoddisplay
(self, encoded_str: str)
few-shot/arclib/representers.py:81
↓ 1 callersFunctiondisplay_messages
(messages: MESSAGES)
few-shot/arclib/messagers.py:31
↓ 1 callersFunctionevaluate_completion
Run `eval_times` fine-tune / eval cycles for one completion.
general-knowledge/src/query/query_server.py:128
↓ 1 callersFunctionextract_final_answer
Return only the content after a 'Final answer:' (case-insensitive) marker. If no marker is present, return 'idk' (so it will be graded as inc
general-knowledge/src/utils.py:136
↓ 1 callersMethodfind_contiguous_shapes
(self, grid: Grid, color: int)
few-shot/arclib/representers.py:288
↓ 1 callersMethodfind_contiguous_shapes
( self, grid: Grid, color: int, include_diagonals=False )
few-shot/arclib/representers.py:516
↓ 1 callersMethodfind_contiguous_shapes_moore
(self, grid: Grid, color: int)
few-shot/arclib/representers.py:297
↓ 1 callersFunctionformat_and_filter
(formatter, tokenizer, task, train_on_input: False)
few-shot/ttt.py:240
↓ 1 callersFunctionformat_and_filter
(formatter, tokenizer, task, train_on_input: False)
few-shot/self-edit.py:257
↓ 1 callersFunctionformat_and_filter
(formatter: Any, tokenizer: Any, task: Task)
few-shot/inference/preprocess.py:80
↓ 1 callersFunctiongenerate
( prompts: List[str], model: str, sampling: Dict[str, Any], stop_ids: List[int] )
general-knowledge/src/utils.py:97
next →1–100 of 359, ranked by callers