neurovlm.data.fetch_data

Contents

neurovlm.data.fetch_data#

neurovlm.data.fetch_data(datasets=None, models=None, cache_dir=None)[source]#

Fetch NeuroVLM data from Hugging Face repositories.

This function downloads all required datasets and models from Hugging Face and caches them locally. By default, it fetches all available repositories.

Parameters:
  • datasets (list of str, optional) – List of dataset repository keys to download. If None, downloads all datasets. Available keys: “neuro_image_papers”, “neuro_wiki”, “cognitive_atlas”, “embedded_text”

  • models (list of str, optional) – List of model repository keys to download. If None, downloads all models. Available keys: “encoder_and_proj_head”

  • cache_dir (str, optional) – Custom cache directory. If None, uses Hugging Face default cache.

Returns:

cache_dir – Path to the cache directory where data is stored.

Return type:

str

Examples

>>> # Fetch all data
>>> cache_dir = fetch_data()
>>> # Fetch only specific datasets
>>> cache_dir = fetch_data(datasets=["neuro_image_papers", "cognitive_atlas"])
>>> # Fetch only models
>>> cache_dir = fetch_data(datasets=[], models=["encoder_and_proj_head"])