MCPcopy Index your code

hub / github.com/StarTrail-org/PixelRAG / functions

Functions1,050 in github.com/StarTrail-org/PixelRAG

↓ 94 callersMethodcdp
Send a CDP command, wait for response.
render/src/pixelrag_render/strategies/base.py:51
↓ 38 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path, *args, **kwargs)
train/models/biqwen3.py:62
↓ 19 callersFunction_clear_rope_deltas
Clear stale rope_deltas state on Qwen3VL model. Qwen3VLModel.compute_3d_position_ids stores self.rope_deltas after processing image batches.
train/train_contrastors.py:896
↓ 19 callersMethodrun
Distribute tile_infos dynamically across workers and collect results. Splits tile_infos into small work chunks and puts them into the shared
embed/src/pixelrag_embed/embed.py:1385
↓ 17 callersFunctioncn
(...inputs: ClassValue[])
web/lib/utils.ts:4
↓ 17 callersFunctiondebug_trace
Emit a per-rank debug line when tracing distributed hangs.
train/train_contrastors.py:391
↓ 16 callersFunctionchunk_inputs
Split a batch of inputs into chunks along batch dimension. Only includes tensor values in chunks (non-tensors are dropped) so that RandContex
train/train_contrastors.py:924
↓ 16 callersFunctionextract_url_from_metadata
Extract URL from example metadata. Args: example: Example dict with 'metadata' field. Returns: Extracted URL or None.
eval/lib/simpleqa_data.py:215
↓ 16 callersMethodupdate
(self, model)
train/train_contrastors.py:134
↓ 15 callersMethodclose
(self)
render/src/pixelrag_render/strategies/base.py:55
↓ 14 callersFunctionarticle_url
Get navigate URL for an article. Supports both file:// and http://.
render/src/pixelrag_render/strategies/base.py:42
↓ 13 callersMethodclose
(self)
embed/src/pixelrag_embed/embed.py:1597
↓ 13 callersMethodkill
(self)
render/src/pixelrag_render/strategies/cdp_overlap.py:117
↓ 13 callersFunctionworker_task
(wi: int)
render/src/pixelrag_render/backends/fast_cdp.py:347
↓ 11 callersFunction_log
Write log line directly to file descriptor (wandb-proof).
train/train.py:39
↓ 11 callersMethodclose
(self)
render/src/pixelrag_render/backends/fast_cdp.py:226
↓ 9 callersFunctionclip_loss
InfoNCE contrastive loss with hard negative support (from contrastors/loss.py). Inspired by: https://github.com/mlfoundations/open_clip/blob/main
train/train_contrastors.py:206
↓ 9 callersFunctionlaunch_websocket
Launch Chrome via subprocess, connect via websocket.
render/src/pixelrag_render/strategies/connection.py:181
↓ 8 callersFunction_get_query_image_path_for_example
Get EVQA query image path. Dispatches by dataset_name: inaturalist | landmarks.
eval/lib/retrieval.py:293
↓ 8 callersFunctionprocess_queries
Wrap queries in chat template with retrieval instruction.
train/train_contrastors.py:794
↓ 8 callersMethodwait
(self, timeout=None)
render/src/pixelrag_render/strategies/cdp_overlap.py:114
↓ 7 callersMethodcdp
(self, method: str, params: dict | None = None)
render/src/pixelrag_render/strategies/connection.py:93
↓ 7 callersMethodcdp
(self, method: str, params: dict | None = None)
render/src/pixelrag_render/backends/fast_cdp.py:195
↓ 7 callersFunctionlaunch_playwright
Launch Chrome via Playwright, get CDP session.
render/src/pixelrag_render/strategies/connection.py:234
↓ 7 callersFunctionresolve_editorial_photo
Return the path to the editorial photo for a QA row, or None.
eval/run_livevqa.py:439
↓ 6 callersFunction_bytes_to_pil
Convert raw bytes, base64 string, dict with 'bytes' key, or PIL Image to a PIL Image. Returns None on failure.
eval/lib/benchmarks.py:66
↓ 6 callersMethodapply
Swap model params with EMA params. Call before eval.
train/train_contrastors.py:139
↓ 6 callersFunctionprocess_doc_images
Wrap document images in chat template with representation instruction. Returns batch-major pixel_values (B, max_patches, dim) so that chunk_i
train/train_contrastors.py:806
↓ 6 callersMethodsend_signal
(self, _)
render/src/pixelrag_render/strategies/cdp_overlap.py:111
↓ 6 callersFunctiontileUrl
(hit: { article_id: number; tile_index: number; chunk_index: number; })
web/lib/api.ts:30
↓ 5 callersFunction_cdp_send
Send a CDP command and wait for its response.
render/src/pixelrag_render/backends/websocket.py:72
↓ 5 callersFunction_filter_tiles_by_aspect_ratio
Filter out tiles with extreme aspect ratios. Args: tile_paths: List of tile image paths. max_aspect_ratio: Maximum allowed aspect
eval/lib/retrieval.py:1481
↓ 5 callersFunction_format_mc_options
Format MC options as 'A. text1\nB. text2\n...
eval/lib/simpleqa_data.py:1067
↓ 5 callersFunctionbuild_openai_client
Create an OpenAI-compatible client for local or hosted endpoints.
train/train_contrastors.py:399
↓ 5 callersFunctiongather_with_grad
All-gather tensors across GPUs while preserving gradients.
train/train_contrastors.py:92
↓ 5 callersMethodgenerate
Generate response from messages with retry on timeout/connection errors. Args: max_retries: Retry count for timeout errors.
eval/lib/llm.py:524
↓ 5 callersFunctiongrad_cache_loss
GradCache: large effective batch with constant memory (from contrastors/loss.py). 1. Forward all chunks WITHOUT grad → cache embeddings 2. Co
train/train_contrastors.py:289
↓ 5 callersFunctionlog
(...args)
web/agent-server.mjs:65
↓ 5 callersFunctionrun_test_evals
Run mini-v6/v8/... eval on every loaded test dataset and log per-set metrics.
train/train_contrastors.py:2855
↓ 5 callersFunctionsend
(event, data)
web/agent-server.mjs:222
↓ 5 callersFunctionsplit_image_to_tiles
Split an image into fixed-size tiles. Args: image_path: Path to the source image. output_dir: Directory to save tiles. ti
eval/lib/simpleqa_data.py:648
↓ 4 callersFunction_format_rate
(rate: float)
index/src/pixelrag_index/monitor.py:60
↓ 4 callersMethod_health_check
Quick HTTP check to see if kiwix-serve is responding.
index/src/pixelrag_index/sources/kiwix.py:133
↓ 4 callersFunction_resolve_path
Resolve chunk file path from article_id, tile_index, chunk_index.
serve/src/pixelrag_serve/api.py:248
↓ 4 callersFunction_save_task_query_image
Save query image from any task to disk. Returns path or None. Images saved to {base_dir}/{task_name}_images/{example_id}.png Works with PIL im
eval/lib/retrieval.py:477
↓ 4 callersFunctionbuild_messages_for_livevqa
Build OpenAI-compatible messages for a LiveVQA MCQ call. Supports mixed content: images first, then text chunks, then the MCQ prompt.
eval/run_livevqa.py:250
↓ 4 callersFunctioncapture_screenshot_for_example
Capture screenshot for a single example. Args: example: Example dict with metadata containing URL. screenshot_dir: Directory to s
eval/lib/simpleqa_data.py:314
↓ 4 callersMethodclose
(self)
index/src/pixelrag_index/sources/kiwix.py:589
↓ 4 callersFunctioncollect_grads
(model, logit_scale)
train/tests/test_grad_multi_gpu.py:101
↓ 4 callersFunctionfetchApi
(path: string, init?: RequestInit)
web/lib/api.ts:5
↓ 4 callersMethodget_hits
Return raw per-hit dicts (title/text/url/score/...) for this example. Used by wrappers that need per-chunk granularity (e.g. RenderedTextWrap
eval/lib/retrieval.py:3444
↓ 4 callersFunctionnormalize_answer
SQuAD-style normalization: lowercase, strip punctuation, articles, whitespace.
eval/run_monaco.py:731
↓ 4 callersFunctionpercentile
(arr, p)
render/src/pixelrag_render/bench/bench_throughput.py:353
↓ 4 callersFunctionpool_and_normalize
Last-token pooling + L2 normalization. Matches the production embedding pipeline (embed_tiles.py direct_gpu backend).
train/model.py:58
↓ 4 callersMethodprefetch
(self, examples: list[dict])
eval/lib/retrieval.py:3757
↓ 4 callersFunctionrender_urls
Render a list of URLs to tiled JPEG images. Args: urls: URLs to capture. output_dir: Directory to write tile subdirectories into.
render/src/pixelrag_render/render.py:58
↓ 4 callersMethodretrieve
Retrieve relevant content for the query. Args: query: The question/query text. example: The full example dict (may co
eval/lib/retrieval.py:60
↓ 4 callersFunctionsave_checkpoint
(step, epoch)
train/train_contrastors.py:2709
↓ 4 callersFunctionsend
(event: string, data: unknown)
web/app/api/chat/route.ts:213
↓ 4 callersMethodset_epoch
(self, epoch)
train/train_contrastors.py:661
↓ 4 callersMethodstop
(self)
index/src/pixelrag_index/sources/kiwix.py:248
↓ 3 callersMethod_build_article_list
(self)
index/src/pixelrag_index/sources/kiwix.py:530
↓ 3 callersFunction_count_lines
(path: Path)
index/src/pixelrag_index/monitor.py:145
↓ 3 callersFunction_eager_load_images
Force lazy images to load by promoting data-src and setting loading='eager'.
eval/lib/screenshot.py:193
↓ 3 callersFunction_extract_host
Extract physical hostname from machine_id (``hostname-PID``). Machine IDs look like ``ip-172-31-2-101-4188035`` (AWS) or ``129-80-136-19-1450
index/src/pixelrag_index/monitor.py:74
↓ 3 callersFunction_init_screenshot_utils
Initialize screenshot utilities (lazy import).
eval/lib/simpleqa_data.py:296
↓ 3 callersFunction_load_image
(path)
train/train_contrastors.py:855
↓ 3 callersFunction_parse_new_jsonl
Parse newly appended lines from a JSONL results file into state/cycle.
index/src/pixelrag_index/monitor.py:116
↓ 3 callersMethod_retrieve_single
(self, query: str, example: dict)
eval/lib/retrieval.py:3118
↓ 3 callersFunction_wait_for_images
Wait for all document images to finish loading (load or error).
eval/lib/screenshot.py:212
↓ 3 callersFunctionbuild_usage_summary
(client_ctx: dict, model: str)
train/filter_hard_negatives_vqa.py:754
↓ 3 callersFunctioncandidate_priority
(review: dict)
train/clean_queries_simpleqa_style.py:514
↓ 3 callersFunctionfind_chrome
Find the best available Chrome binary. Auto-installs if none found. Search order: 1. CHROME_PATH env var 2. pixelrag-installed headless_s
render/src/pixelrag_render/chrome.py:50
↓ 3 callersFunctionget_chunked_embeddings
Forward pass on chunks without grad, caching embeddings + RNG states.
train/train_contrastors.py:274
↓ 3 callersFunctiongpu_worker
Load model on one GPU, embed all assigned tiles, write partial .npz. This function runs in a child process with CUDA_VISIBLE_DEVICES set. Ar
embed/src/pixelrag_embed/embed.py:732
↓ 3 callersFunctionhandleFile
(file: File)
web/components/SearchBar.tsx:55
↓ 3 callersFunctionhandleFile
(file: File)
web/app/chat/page.tsx:183
↓ 3 callersFunctionhandleNumber
( field: "n_docs" | "nprobe" | "min_tile_height", value: string )
web/components/SearchControls.tsx:31
↓ 3 callersFunctioninit_chat_templates
Pre-compute chat template strings once to avoid per-batch overhead.
train/train_contrastors.py:751
↓ 3 callersFunctionmake_collate_fn
Collate: process queries as text, images as visual prompts. With hard negatives, document images are interleaved: [pos1, neg1a, neg1b, po
train/train_contrastors.py:847
↓ 3 callersFunctionmanual_all_reduce_grads
Average gradients across ranks for modules outside DDP's reducer path.
train/train_contrastors.py:380
↓ 3 callersFunctionrender_pdf
Render a PDF file to tiled JPEG images. Args: path: Path to the PDF file. output_dir: Directory to write the tile subdirectory in
render/src/pixelrag_render/render.py:110
↓ 3 callersFunctionrender_url
Render a URL to tiled JPEG images. Args: url: URL to capture (http:// or https:// or file://). output_dir: Directory to write til
render/src/pixelrag_render/render.py:19
↓ 3 callersFunctionrun_gpu_workers_parallel
Launch one non-daemonic process per GPU and collect partial .npz paths. When reuse_workers=True, uses dynamic work distribution via a shared queu
embed/src/pixelrag_embed/embed.py:1645
↓ 3 callersFunctionrun_query_side_tests
(step)
train/train_contrastors.py:2780
↓ 3 callersFunctionsave_checkpoint
Save LoRA weights + optimizer/scheduler state.
train/train.py:71
↓ 3 callersFunctionsave_npz
Save npz with optional compression.
embed/src/pixelrag_embed/embed.py:130
↓ 3 callersFunctionsse
(event, data)
web/agent-server.mjs:134
↓ 3 callersFunctionupdate
(patch: Partial<SearchOptions>)
web/components/SearchControls.tsx:27
↓ 3 callersMethodwait_for_event
Wait for a CDP event with the given method name. Args: method: CDP event method, e.g. "Page.frameStoppedLoading".
render/src/pixelrag_render/strategies/connection.py:106
↓ 3 callersFunctionwrite_jsonl
(path: Path, rows: list[dict])
train/split_first5_chunks.py:61
↓ 2 callersMethod_batch_ocr
(self, paths: list[str])
eval/lib/retrieval.py:3575
↓ 2 callersFunction_build_chat_prompt
Build the embedding prompt using the model's chat template. Uses the official Qwen3-VL-Embedding prompt format: system: <instruction>
embed/src/pixelrag_embed/embed.py:437
↓ 2 callersMethod_cache_path
(self)
index/src/pixelrag_index/sources/kiwix.py:425
↓ 2 callersMethod_capture
( self, tab, article: dict, page_h: int, wi: int )
render/src/pixelrag_render/strategies/cdp_pipelined_dc.py:255
↓ 2 callersMethod_download_zim
(url: str, dest: Path)
index/src/pixelrag_index/sources/kiwix.py:337
↓ 2 callersFunction_embed_tile_infos_with_engine
Embed tile infos with a pre-initialized engine function + prompt. Uses a pipeline: background threads read files, hash, and decode only uniqu
embed/src/pixelrag_embed/embed.py:858
↓ 2 callersMethod_ensure_recv
(self)
render/src/pixelrag_render/backends/fast_cdp.py:158
↓ 2 callersMethod_ensure_recv_loop
(self)
render/src/pixelrag_render/strategies/connection.py:39
↓ 2 callersMethod_extract_urls_from_results
Extract source URLs from tile paths in results, preserving retrieval order.
eval/lib/retrieval.py:3047
next →1–100 of 1,050, ranked by callers