Skip to main content

gar_vis

Visualisation tool for Corpus Graphs

Installation

Install the package via pip:

pip install gar-vis

Getting Started

Run the following code for a simple demo:

import pyterrier as pt
from pyterrier_adaptive import CorpusGraph
from pyterrier_pisa import PisaIndex

from gar_vis import GarVis

if __name__ == "__main__":
    corpus_graph = CorpusGraph.from_hf("macavaney/msmarco-passage.corpusgraph.bm25.128")
    bm25 = PisaIndex.from_dataset("msmarco_passage").bm25()
    dataset = pt.get_dataset(f"irds:msmarco-passage/trec-dl-2019/judged")

    file_path = GarVis.create_neighbourhood(corpus_graph, bm25, dataset)
    GarVis.visualise_neighbourhood(file_path, dataset, min_rel=2)

Or use it with a different corpus graph, retriever and/or dataset (including qrels):

import pyterrier as pt
from pyterrier_adaptive import CorpusGraph
from pyterrier_pisa import PisaIndex

from gar_vis import GarVis

if __name__ == "__main__":
    corpus_graph = ...
    retriever = ...
    dataset = ...

    # Create a new neighbourhood
    file_path = GarVis.create_neighbourhood(corpus_graph, bm25, dataset, k=num_neighbours, run_id="file_name", save_dir = "path_to_file")

    # Or use an existing neighbourhood
    file_path = "path_to_file/file_name.h5"

    # And start the visulisation tool (min_rel is used to set the minimum relevance label to consider the document relevant)
    GarVis.visualise_neighbourhood(file_path, dataset, min_rel=2)

Citation

@inproceedings{rear2025,
    title = {Resource Efficient Adaptive Retrieval},
    author = {Martijn Smits},
    year = {2025},
}

Metadata

Release files for gar-vis 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gar-vis 0.1.2
File Size Uploaded Provenance Actions
gar_vis-0.1.2.tar.gz 7.6 kB Without provenance Details for gar_vis-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gar-vis 0.1.2
File Interpreter ABI Platform Actions
gar_vis-0.1.2-py3-none-any.whl Python 3 none any Details for gar_vis-0.1.2-py3-none-any.whl

Total release size: 15.7 kB

Release files / gar_vis-0.1.2.tar.gz

Download URL gar_vis-0.1.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa2de2e7008aff2b195bbd18c59176fea0970c85cab850f6237f986b3b84b734
BLAKE2b-256 checksum
How to use checksums
42b65689a0a8361f26b6802705366355e44963abe812bca09bf69be26fe24d8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / gar_vis-0.1.2-py3-none-any.whl

Download URL gar_vis-0.1.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e53d574dff6c261dbf8e778bf66164a624f1710671078cdf1e1cc8f54342b153
BLAKE2b-256 checksum
How to use checksums
b3ea5680c9d1a10b311d1721e5fc03246f37612e7b76065b24000d636fc7a936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for gar-vis 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page