MCPcopy Create free account

hub / github.com/ChartGalaxy/ChartGalaxy / functions

Functions85 in github.com/ChartGalaxy/ChartGalaxy

↓ 11 callersFunctionload_json
(save_path, output=False)
code_generation_benchmark/utils/utils_chat.py:29
↓ 10 callersFunctionsafe_save_json
(info_dict, save_path, output=False)
code_generation_benchmark/utils/utils_chat.py:48
↓ 5 callersFunctionload_txt
(save_path)
code_generation_benchmark/utils/utils_chat.py:39
↓ 4 callersFunctionbox_area
(box)
code_generation_benchmark/utils/utils_eval.py:28
↓ 4 callersFunctioncrop_icon
(full_img_path: str, norm_bbox: list)
code_generation_benchmark/utils/utils_screenshot.py:49
↓ 4 callersFunctionextract_image_feature
(pil_img: Image.Image, model_type='clip')
code_generation_benchmark/utils/utils_image_encoder.py:23
↓ 3 callersFunctiondraw_rectangle
Draw a rectangle on an image. Args: image: numpy array of shape (H, W, 3), the image to draw on bbox: tuple of (x_min, y
code_generation_benchmark/utils/utils_vis_bbox.py:6
↓ 3 callersFunctionget_logger
(name=None, log_path=None)
code_generation_benchmark/utils/utils_chat.py:18
↓ 3 callersMethodload_prompt_file
Load prompt file content
example_based_generation/generate_infographic.py:43
↓ 2 callersFunctioncolor_similarity
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:5
↓ 2 callersFunctionconvert_tree_json
(logger, tree_file, file_type)
code_generation_benchmark/utils/utils_eval.py:233
↓ 2 callersMethodgenerate_image
Generate image using GPT-Image-1
example_based_generation/generate_infographic.py:133
↓ 2 callersMethodgenerate_image_prompt
Generate image generation prompt
example_based_generation/generate_infographic.py:95
↓ 2 callersFunctionget_client_claude
()
code_generation_benchmark/utils/utils_chat.py:84
↓ 2 callersFunctionget_client_gemini
()
code_generation_benchmark/utils/utils_chat.py:77
↓ 2 callersFunctionget_client_internvl
()
code_generation_benchmark/utils/utils_chat.py:91
↓ 2 callersFunctionget_client_openai
()
code_generation_benchmark/utils/utils_chat.py:70
↓ 2 callersFunctionget_driver
()
code_generation_benchmark/utils/utils_screenshot.py:12
↓ 2 callersFunctionimage_similarity
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:25
↓ 2 callersFunctionnormalize_bbox
(bbox, ref)
code_generation_benchmark/utils/utils_eval.py:57
↓ 2 callersFunctionparse_color_to_visual_rgb
(color_str, opacity=1.0, background=(255, 255, 255))
code_generation_benchmark/utils/utils_color.py:19
↓ 2 callersFunctionparse_to_list
Parses text to a list of strings if possible; strips quotes and whitespace.
code_understanding/scoring.py:32
↓ 2 callersFunctionparse_tree_from_html
(driver: webdriver.Chrome, html_path: str, save_svg=True)
code_generation_benchmark/utils/utils_parse.py:84
↓ 2 callersFunctionrgb_to_lab
Convert an RGB color to Lab color space. RGB values should be in the range [0, 255].
code_generation_benchmark/utils/utils_color.py:6
↓ 2 callersFunctionsingle_chat
(logger, data_path, model_type, setting_name=None)
code_generation_benchmark/main.py:17
↓ 2 callersFunctionsingle_gt_convert
(logger, data_path)
code_generation_benchmark/main.py:52
↓ 2 callersFunctiontake_screenshot
(driver: webdriver.Chrome, html_path: str)
code_generation_benchmark/utils/utils_screenshot.py:15
↓ 2 callersFunctiontext_similarity
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:20
↓ 2 callersFunctionto_float
Converts text to float, stripping percent signs. Returns None on failure.
code_understanding/scoring.py:47
↓ 2 callersFunctionvis_bboxes
(json_path, image_path=None)
code_generation_benchmark/utils/utils_vis_bbox.py:111
↓ 1 callersFunctionask_question_with_image
(image_path: Path, setting_name, model_type)
code_generation_benchmark/utils/utils_chat.py:99
↓ 1 callersFunctioncal_cosine_dist
(vec1, vec2)
code_generation_benchmark/utils/utils_image_encoder.py:32
↓ 1 callersMethodclip_feat
(self, pil_img: Image.Image)
code_generation_benchmark/utils/utils_image_encoder.py:14
↓ 1 callersFunctioncolor_similarity_ciede2000
Calculate the color similarity between two RGB colors using the CIEDE2000 formula. Returns a similarity score between 0 and 1, where 1 means
code_generation_benchmark/utils/utils_color.py:58
↓ 1 callersFunctioncompute_element_pairs
(logger, gt_file, pr_file)
code_generation_benchmark/utils/utils_eval.py:259
↓ 1 callersFunctionconvert_svg_to_html
(svg_path: str, html_path: str)
code_generation_benchmark/utils/utils_parse.py:103
↓ 1 callersFunctiondo_eval
(logger, task)
code_generation_benchmark/main.py:174
↓ 1 callersFunctiondraw_labeled_rectangle
Draw a rectangle with a label on an image. Args: image: numpy array, the image to draw on bbox: tuple of (x_min, y_min,
code_generation_benchmark/utils/utils_vis_bbox.py:45
↓ 1 callersFunctiondraw_rectangles
Draw multiple rectangles on an image. Args: image: numpy array of shape (H, W, 3), the image to draw on bboxes: list of
code_generation_benchmark/utils/utils_vis_bbox.py:23
↓ 1 callersFunctioneval_scores
(gt_file, pr_file)
code_generation_benchmark/utils/utils_eval.py:314
↓ 1 callersFunctionevaluate_predictions_chartqapro
(predictions, pred_key='prediction')
code_understanding/scoring.py:125
↓ 1 callersFunctionevaluate_single_answer
Evaluates a single target-prediction pair: - Numeric within tolerance or exact year match inside this helper. - Falls back to ANLS for te
code_understanding/scoring.py:57
↓ 1 callersFunctionfix_list_format
Standardize string representations of lists, adding quotes around elements if missing, and safely evaluate to Python list. Returns original i
code_understanding/scoring.py:14
↓ 1 callersMethodgenerate_title_text
Generate title text using GPT-4
example_based_generation/generate_infographic.py:67
↓ 1 callersFunctionget_bboxes
Get bounding boxes from a JSON file. Args: json_path: str, path to the JSON file Returns: list of tuples: each
code_generation_benchmark/utils/utils_vis_bbox.py:80
↓ 1 callersFunctionget_client
(name=None)
code_generation_benchmark/utils/utils_chat.py:61
↓ 1 callersFunctionget_high_level_score
(ref_path: Path, gen_path: Path, eval_model)
code_generation_benchmark/utils/utils_judge.py:9
↓ 1 callersFunctionis_visible_xyxy
(bbox)
code_generation_benchmark/utils/utils_eval.py:32
↓ 1 callersFunctionis_zero
(value)
code_generation_benchmark/utils/utils_eval.py:18
↓ 1 callersFunctionjudge_invalid_elements
(ele)
code_generation_benchmark/utils/utils_eval.py:108
↓ 1 callersFunctionjudge_need_to_chat
(model_dir: Path)
code_generation_benchmark/main.py:181
↓ 1 callersFunctionleaf_cost
(gleaf, pleaf)
code_generation_benchmark/utils/utils_eval.py:185
↓ 1 callersFunctionload_config
(path: str = "configs/default_config.yaml")
code_generation_benchmark/configs/loader.py:8
↓ 1 callersFunctionload_env
()
code_generation_benchmark/configs/loader.py:14
↓ 1 callersFunctionload_predictions
(file_path)
code_understanding/scoring.py:9
↓ 1 callersFunctionmain
Main function
example_based_generation/generate_infographic.py:258
↓ 1 callersFunctionmain
()
code_understanding/scoring.py:152
↓ 1 callersFunctionmain
(logger, root_dir)
code_generation_benchmark/main.py:220
↓ 1 callersFunctionmain_chat_multiprocess
(logger, root_dir)
code_generation_benchmark/main.py:186
↓ 1 callersFunctionnormalize_tree_leafs
(tree, ref)
code_generation_benchmark/utils/utils_eval.py:176
↓ 1 callersFunctionpair_leafs
(gt_leafs, pr_leafs, gt_matched_prs, pr_matched_gts, gt_match_costs, gt_match_sims)
code_generation_benchmark/utils/utils_eval.py:212
↓ 1 callersFunctionparse_all_leafs
(tree, ele_list, ref_group_name="")
code_generation_benchmark/utils/utils_eval.py:144
↓ 1 callersFunctionparse_element_with_style_and_bbox
(driver, web_element)
code_generation_benchmark/utils/utils_parse.py:7
↓ 1 callersFunctionparse_svg_tree
(driver, bs_element: BeautifulSoup, selenium_element)
code_generation_benchmark/utils/utils_parse.py:45
↓ 1 callersFunctionpos_similarity
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:38
↓ 1 callersFunctionpos_similarity_1d
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:46
↓ 1 callersFunctionprint_table
(logger, root_dir, model_types, save_path, eval_model='gpt-4.1-mini')
code_generation_benchmark/print_results.py:7
↓ 1 callersMethodprocess_all_csv_files
Process all CSV files
example_based_generation/generate_infographic.py:237
↓ 1 callersMethodprocess_csv_file
Process a single CSV file
example_based_generation/generate_infographic.py:196
↓ 1 callersMethodread_csv_data
Read CSV file and convert to string format
example_based_generation/generate_infographic.py:53
↓ 1 callersFunctionrelaxed_correctness_chartqapro
Calculates relaxed correctness between target and prediction. Supports list inputs; uses year_flags to override year handling.
code_understanding/scoring.py:83
↓ 1 callersFunctionsingle_exp
(logger, data_path, model_type, setting_name=None, eval_only=False, low_level=False, high_level=False, eval_mo
code_generation_benchmark/main.py:62
↓ 1 callersFunctionsize_similarity
(gleaf, pleaf)
code_generation_benchmark/utils/utils_scores.py:54
↓ 1 callersFunctiontraverse_dict
(d)
code_generation_benchmark/utils/utils_vis_bbox.py:97
↓ 1 callersFunctionvis_bboxes_with_indexes
(bboxes, origin_image_path, save_path)
code_generation_benchmark/utils/utils_vis_bbox.py:129
Method__init__
Initialize image generator Args: api_key: OpenAI API key base_url: Optional API base URL for custom
example_based_generation/generate_infographic.py:19
Method__init__
(self)
code_generation_benchmark/utils/utils_image_encoder.py:9
Functionconvert_g_to_html
(g_str, gw, gh, html_path: str)
code_generation_benchmark/utils/utils_parse.py:122
Functionfind_ele_in_tree
(tree, ele_list, find_all=False, tag_name=None, class_name=None, id_name=None)
code_generation_benchmark/utils/utils_eval.py:76
Functionget_tree_height
(tree)
code_generation_benchmark/utils/utils_eval.py:100
Functionnormalize_leafs
(leafs, ref)
code_generation_benchmark/utils/utils_eval.py:181
Functionparse_all_text_leafs
(tree, ele_list)
code_generation_benchmark/utils/utils_eval.py:92
Functionprocess_chat_task
(logger, task)
code_generation_benchmark/main.py:164
Functionvis_one_bbox
(bbox, origin_image_path, save_path)
code_generation_benchmark/utils/utils_vis_bbox.py:122
Functionxywh2xyxy
(x)
code_generation_benchmark/utils/utils_eval.py:41