Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Base code implementation for MultimodalAI'25 Workshop Hackathon

License

pykale/mmai-hackathon

Repository files navigation

MultimodalAI'25 Hackathon Base Source Code

tests codecov GitHub license Python

Overview

This repository provides the base source code for the MultimodalAI'25 workshop Hackathon. It is designed to help participants get started quickly with a pre-configured Python environment and essential dependencies for development and testing.

Further details about the hackathon are available on the Wiki webpage.

Requirements

  • Python 3.10, 3.11, or 3.12
  • Git

Installation

The steps below are linear and work with venv, conda, or uv. Pick one method and follow it end‑to‑end.

1) Clone and create an environment

git clone https://github.com/pykale/mmai-hackathon.git
cd mmai-hackathon

# conda (recommended)
conda create -n mmai-hackathon python=3.11 -y
conda activate mmai-hackathon


# venv (alternative)
# python3 -m venv .venv && source .venv/bin/activate

# uv (alternative)
# uv venv .venv && source .venv/bin/activate

2) Install dependencies (with tests)

# Recommended for development and testing (includes pytest, coverage, linters)
pip install -e .[dev]

# If you only need runtime dependencies (not recommended for contributors):
# pip install -e .

By default, the dependencies declared in pyproject.toml are sufficient (they include torch and torch-geometric).

Only if you enable a data‑loading extension that requires extra PyG ops (e.g., torch-scatter, torch-sparse, torch-cluster, torch-spline-conv), do you need to install those extras. The snippet below detects your Torch/CUDA and prints the correct wheel index to use for these optional packages:

# Inspect Torch / CUDA (optional)
python - <<'PYINFO'
import torch
print('Torch:', torch.__version__)
print('CUDA version:', torch.version.cuda)
print('CUDA available:', torch.cuda.is_available())
PYINFO

# Compute the PyG wheel index matching your Torch/CUDA
PYG_INDEX=$(python - <<'PYG'
import torch
torch_ver = torch.__version__.split('+')[0]
cuda = torch.version.cuda
if cuda:
    cu_tag = f"cu{cuda.replace('.', '')}"
else:
    cu_tag = 'cpu'
print(f"https://data.pyg.org/whl/torch-{torch_ver}+{cu_tag}.html")
PYG
)
echo "Using PyG wheel index: $PYG_INDEX"

# Install only the extras you need, for example:
# pip install torch-scatter -f "$PYG_INDEX"
# pip install torch-sparse  -f "$PYG_INDEX"
# pip install torch-cluster -f "$PYG_INDEX"
# pip install torch-spline-conv -f "$PYG_INDEX"

More details: https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html

3) Pre‑commit hooks

This repository uses pre-commit hooks to ensure code quality and consistency. To set up pre-commit hooks locally, follow these steps:

  1. Install the pre-commit package if you haven't already:

    pip install pre-commit
  2. Install the hooks defined in the .pre-commit-config.yaml file:

    pre-commit install
  3. Run the hooks manually on all files (optional):

    pre-commit run --all

Pre-commit hooks will now run automatically on every commit to check and format your code.

4) Run tests

pytest

Example data

Example data can be downloaded from this Dropbox folder. No Dropbox account is required to access the files.

Sample Dataset and DataLoader design

sample-dataloader-design.jpg

Notes

  • The project restricts Python versions to 3.10–3.12 as specified in .python-version and pyproject.toml.
  • For more information about the dependencies, see pyproject.toml.

Tip: Integration tests optionally use real data. In CI, datasets are downloaded with python -m tests.dropbox_download "/MMAI25Hackathon" "MMAI25Hackathon" --unzip when a Dropbox token is configured.

Authors

About

Base code implementation for MultimodalAI'25 Workshop Hackathon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages