MCPcopy Create free account

hub / github.com/bunnelab/mtbbench / functions

Functions164 in github.com/bunnelab/mtbbench

↓ 47 callersMethodload
(self, path: Path)
neurips25/tools/drugbank.py:62
↓ 10 callersMethodto_json
(self)
neurips25/utils/patient.py:53
↓ 8 callersMethodformat
(event)
neurips25/utils/patient.py:198
↓ 7 callersFunctionconvert_days_to_years
(df: pd.DataFrame)
neurips25/utils/patient.py:9
↓ 5 callersMethodpreprocess
Preprocesses the DrugBank data. Part of this code is inspired from https://github.com/dhimmel/drugbank/blob/gh-pages/parse.ipynb
neurips25/tools/drugbank.py:74
↓ 4 callersMethodget_sorted_events
Collects all events with START_AGE and sorts them by START_AGE.
neurips25/utils/patient.py:244
↓ 4 callersMethodquery
Search PubMed for articles related to a given search term or fetch a specific article by its PubMed ID. Args: - search_t
neurips25/tools/pubmed.py:42
↓ 4 callersMethodsummarize_events
Prints a clean timeline of events
neurips25/utils/patient.py:231
↓ 4 callersMethodto_json
Get all data for the patient in a dictionary format Args: abnormal_blood_data_only (bool): If true, only the blood tests
neurips25/utils/hancock_patient.py:245
↓ 3 callersMethodevaluate
Evaluate the model with the given messages.
neurips25/eval/base_hf_eval.py:57
↓ 3 callersFunctionresize_image
Resize the image patch to have a maximum side length of max_side.
neurips25/utils/create_patient_cases.py:70
↓ 2 callersFunction_convert_to_chat_format
Convert the input messages to the chat format required by the model.
neurips25/eval/vllm_eval_multimodal.py:29
↓ 2 callersMethod_use_ihctool
Use the IHC model to analyze the image.
neurips25/models/agent_with_tools.py:61
↓ 2 callersFunctionevaluate_model
(model, test_df, SEED)
neurips25/utils/train_abmil.py:84
↓ 2 callersMethodextract_patient_cores_from_recomputed_centroids
Extracts cores from recomputed centroids if the TMA_CellDensityMeasurements_recomputed folder exists and contains any TMA centroids for the p
neurips25/utils/hancock_patient.py:384
↓ 2 callersMethodget_WSI
Find the WSIs of the patient if any Args: with_annotations (bool): If true, the annotations are also returned if any
neurips25/utils/hancock_patient.py:474
↓ 2 callersMethodget_all_drugnames
Returns a list of all drug names in the DrugBank dataset.
neurips25/tools/drugbank.py:151
↓ 2 callersMethodget_patient_cores_coordinates
Reads CSV files from a directory and maps patient IDs to their corresponding core coordinates. Args: none Returns
neurips25/utils/hancock_patient.py:289
↓ 2 callersMethodget_thumbnails
Gets low resolution thumbnails of the patient IHC images. Uses recomputed thumbnails if they exist. Args: recomputed (boo
neurips25/utils/hancock_patient.py:454
↓ 2 callersMethodquery
(self, **kwargs)
neurips25/tools/drugbank.py:145
↓ 1 callersMethod__init__
(self, df, split, num_features=2048, seed=42)
neurips25/utils/train_abmil.py:111
↓ 1 callersMethod__init__
Initialize the BaseTextHFEval class with model name and system prompt.
neurips25/eval/hf_eval_text2text.py:9
↓ 1 callersMethod__init__
(self, tools=False, *args, **kwargs)
neurips25/eval/vllm_eval_multimodal.py:122
↓ 1 callersMethod_attach_files
Attach files to the conversation based on the requested files.
neurips25/models/agent_with_tools_msk.py:79
↓ 1 callersMethod_attach_files
Attach files to the conversation based on the requested files.
neurips25/models/agent_with_tools.py:105
↓ 1 callersMethod_attach_files
Attach files to the conversation based on the requested files.
neurips25/models/agent.py:48
↓ 1 callersMethod_dettach_files
Detach files from the conversation.
neurips25/models/agent_with_tools_msk.py:117
↓ 1 callersMethod_dettach_files
Detach files from the conversation.
neurips25/models/agent_with_tools.py:154
↓ 1 callersMethod_dettach_files
Detach files from the conversation.
neurips25/models/agent.py:86
↓ 1 callersMethod_extract_cores_from_centroids
Extracts a core from a TMA slide using the given centroid coordinates. Args: slide_path (str): The path to the TMA slide.
neurips25/utils/hancock_patient.py:344
↓ 1 callersMethod_image_to_data_url
(self, path: str)
neurips25/eval/gemma_3.py:31
↓ 1 callersMethod_image_to_data_url
(self, path: str)
neurips25/eval/internvl.py:32
↓ 1 callersMethod_image_to_data_url
(self, path: str)
neurips25/eval/gpt_4o.py:25
↓ 1 callersMethod_parse_files
Parse the file paths to separate images and text files.
neurips25/models/agent_with_tools_msk.py:56
↓ 1 callersMethod_parse_files
Parse the file paths to separate images and text files.
neurips25/models/agent_with_tools.py:82
↓ 1 callersMethod_parse_files
Parse the file paths to separate images and text files.
neurips25/models/agent.py:25
↓ 1 callersMethod_store_log
Store the chat history in a JSON file.
neurips25/models/agent_with_tools_msk.py:342
↓ 1 callersMethod_store_log
Store the chat history in a JSON file.
neurips25/models/agent_with_tools.py:421
↓ 1 callersMethod_store_log
Store the chat history in a JSON file.
neurips25/models/agent.py:277
↓ 1 callersMethod_use_conch
Use the CONCH model to analyze the image and options.
neurips25/models/agent_with_tools.py:28
↓ 1 callersMethod_use_drugbank
(self, file_contents)
neurips25/models/agent_with_tools_msk.py:43
↓ 1 callersMethod_use_pubmed
Use PubMed to search for articles related to the given search term.
neurips25/models/agent_with_tools_msk.py:35
↓ 1 callersFunctioncalculate_recurrence
Calculate recurrence based on clinical data and years.
neurips25/utils/generate_questions.py:340
↓ 1 callersFunctioncalculate_survival
Calculate survival based on clinical data and years.
neurips25/utils/generate_questions.py:328
↓ 1 callersMethodcollect_events_with_start_age
Recursively collects all events with a START_AGE field in the nested JSON data.
neurips25/utils/patient.py:159
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by OpenAI.
neurips25/eval/gemma_3.py:47
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by the model.
neurips25/eval/hf_eval_text2text.py:37
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by the model.
neurips25/eval/hf_eval_text2text.py:133
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by OpenAI.
neurips25/eval/internvl.py:48
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by OpenAI.
neurips25/eval/gpt_4o.py:41
↓ 1 callersMethodconvert_to_chat_format
(self, messages)
neurips25/eval/vllm_eval_multimodal.py:83
↓ 1 callersMethodconvert_to_chat_format
(self, messages)
neurips25/eval/vllm_eval_multimodal.py:147
↓ 1 callersMethodconvert_to_chat_format
Convert the input messages to the chat format required by the model.
neurips25/eval/qwen_25_vl.py:35
↓ 1 callersMethoddecode_response
Decode the generated response to a human-readable format.
neurips25/eval/base_hf_eval.py:51
↓ 1 callersMethoddistant_query
Doc: https://dev.drugbank.com/guides/implementation/medication_search
neurips25/tools/drugbank.py:139
↓ 1 callersMethoddownload
Automated download. Requires setting env variables DRUGBANK_USERNAME and DRUGBANK_PASSWORD
neurips25/tools/drugbank.py:32
↓ 1 callersMethodextract_precomputed_patient_cores
Extracts and saves images of cores belonging to a specific patient from precomputed SVS files. Args: none Return
neurips25/utils/hancock_patient.py:313
↓ 1 callersFunctionextract_roi
Extract the region of interest (ROI) from the WSI based on the annotation.
neurips25/utils/create_patient_cases.py:35
↓ 1 callersFunctionfile_to_data_url
Convert a local image file to a data URL.
neurips25/eval/vllm_eval_multimodal.py:17
↓ 1 callersFunctiongenerate_alive_question
(months, answer, age)
neurips25/utils/msk_question_generation.py:121
↓ 1 callersFunctiongenerate_and_parse_blood_questions
Generate and parse blood questions for a given patient ID.
neurips25/utils/generate_questions.py:179
↓ 1 callersFunctiongenerate_and_parse_context
Generate and parse context for a given patient ID.
neurips25/utils/generate_questions.py:118
↓ 1 callersFunctiongenerate_and_parse_he_ihc_questions
Generate and parse HE and IHC questions for a given patient ID.
neurips25/utils/generate_questions.py:142
↓ 1 callersFunctiongenerate_and_parse_questions
Generate and parse questions for a given patient ID.
neurips25/utils/generate_questions.py:267
↓ 1 callersFunctiongenerate_and_parse_surgery_questions
Generate and parse surgery questions for a given patient ID.
neurips25/utils/generate_questions.py:230
↓ 1 callersFunctiongenerate_following_context
(context)
neurips25/utils/msk_question_generation.py:97
↓ 1 callersFunctiongenerate_initial_patient_context
(patient_clinical, patient_sample, additional)
neurips25/utils/msk_question_generation.py:82
↓ 1 callersFunctiongenerate_progress_question
(months, answer, age)
neurips25/utils/msk_question_generation.py:130
↓ 1 callersFunctiongenerate_recurrence_question
(months, answer, age)
neurips25/utils/msk_question_generation.py:112
↓ 1 callersMethodgenerate_response
Generate a response from the model based on the inputs.
neurips25/eval/base_hf_eval.py:44
↓ 1 callersFunctionget_model
(model_name)
neurips25/utils/load_model.py:5
↓ 1 callersFunctionget_parser
()
neurips25/utils/args.py:3
↓ 1 callersMethodhas_one_abnormal_blood_test
Returns true if at least one blood test is out of reference range
neurips25/utils/hancock_patient.py:221
↓ 1 callersMethodimage_to_text_retrieval
Finds the most relevant text prompt for a given image by comparing image and text embeddings. Args: image_path (str): Th
neurips25/tools/conch.py:18
↓ 1 callersMethodload_client
Initialize the OpenAI client with the API key.
neurips25/eval/gpt_4o.py:19
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/gemma_3.py:16
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/hf_eval_text2text.py:22
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/hf_eval_text2text.py:108
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/internvl.py:17
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/vllm_eval_multimodal.py:64
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/vllm_eval_multimodal.py:130
↓ 1 callersMethodload_model
Load the model from the specified model name.
neurips25/eval/qwen_25_vl.py:16
↓ 1 callersMethodload_processor
Load the processor from the specified model name.
neurips25/eval/gemma_3.py:25
↓ 1 callersMethodload_processor
Load the processor from the specified model name.
neurips25/eval/internvl.py:26
↓ 1 callersMethodload_processor
(self)
neurips25/eval/vllm_eval_multimodal.py:61
↓ 1 callersMethodload_processor
(self)
neurips25/eval/vllm_eval_multimodal.py:127
↓ 1 callersMethodload_processor
Load the processor from the specified model name.
neurips25/eval/qwen_25_vl.py:29
↓ 1 callersMethodlocal_query
Searches the local DrugBank dataset for a drug by its name. Args: query (str): The name of the drug to search for.
neurips25/tools/drugbank.py:125
↓ 1 callersMethodnum_abnormal_blood_tests
Returns the number of blood tests that are out of reference range
neurips25/utils/hancock_patient.py:229
↓ 1 callersMethodnum_blood_tests
Returns the total number of blood tests
neurips25/utils/hancock_patient.py:237
↓ 1 callersMethodprocess_text
Process the input text and prepare it for the model.
neurips25/eval/base_hf_eval.py:37
↓ 1 callersFunctionread_patient
Read and print patient data for a given patient ID.
neurips25/utils/generate_questions.py:74
↓ 1 callersMethodrerank
(self, query, retrieved_docs)
neurips25/tools/pubmed.py:28
↓ 1 callersMethodrun_case
Run the agent on a single patient case.
neurips25/models/agent.py:106
↓ 1 callersFunctionsave_patient_case
(patient_id, cases_path)
neurips25/utils/create_patient_cases.py:87
↓ 1 callersMethodsort_events_by_start_age
Sort the list of events by START_AGE.
neurips25/utils/patient.py:191
↓ 1 callersMethodto_json
(self)
neurips25/utils/patient.py:143
↓ 1 callersFunctiontrain
()
neurips25/utils/train_abmil.py:138
↓ 1 callersFunctiontrain_model
( train_df: pd.DataFrame, input_feature_dim: int, n_heads: int, head_dim: int, dropout: fl
neurips25/utils/train_abmil.py:46
Method__getitem__
(self, idx)
neurips25/utils/train_abmil.py:120
next →1–100 of 164, ranked by callers