iris-at-text2sparql / README.md
Alex Latipov
Harden frozen eval prompts and judge JSON handling
d745844
metadata
title: IRIS at TEXT2SPARQL
sdk: docker
app_port: 7860
pinned: false

TEXT2SPARQL Challenge Workspace

This directory contains the Hugging Face Space for the challenge-facing evaluation backend. It now bundles a frozen copy of the production pipeline and starts local Virtuoso from a snapshot stored in the mounted HF bucket.

Quick Start

cd /home/alatipov/TEXT2SPARQL_Challenge
python3.12 -m venv text2sparql_challenge
source text2sparql_challenge/bin/activate
pip install -r requirements-dev.txt
python -m uvicorn service.app:app --host 0.0.0.0 --port 8000

Then test it:

curl "http://127.0.0.1:8000/text2sparql?dataset=https://text2sparql.aksw.org/2026/dbpedia/&question=Who%20directed%20Inception%3F"

Container Quick Start

This project also includes a Docker setup aligned with Hugging Face Docker Spaces.

cd /home/alatipov/TEXT2SPARQL_Challenge
systemctl --user start docker.service
cp .env.example .env
./scripts/docker_build.sh
./scripts/docker_up.sh
./scripts/docker_ps.sh

See container_cheatsheet.md for the explanation-oriented version.

Files

  • service/app.py: challenge API entrypoint
  • deployment/hf_eval_backend/: frozen production backend config/app
  • src/: bundled pipeline source snapshot
  • scripts/hf_*.sh: bucket restore + Virtuoso + app startup
  • registration/CHALLENGERS.entry.yaml: registration snippet
  • run_local.sh: convenience launcher
  • requirements-dev.txt: local development dependencies, including the official challenge client
  • Dockerfile / compose.yaml: containerized API deployment
  • container_cheatsheet.md: noob-friendly container notes

Local Environment

This project uses a local virtual environment directory:

/home/alatipov/TEXT2SPARQL_Challenge/text2sparql_challenge

Activate it with:

cd /home/alatipov/TEXT2SPARQL_Challenge
source text2sparql_challenge/bin/activate

Hugging Face Space

HF runtime expectation:

  • mounted bucket at /data
  • built DB snapshot uploaded to /data/dbpedia_snapshot/
  • OPENAI_API_KEY set as a Space secret