website / README.md
Andrej Janchevski
docs(deploy): refresh for the post-launch deployment iteration
5ed6f37
---
title: Andrej Janchevski - PhD Research
emoji: πŸ“š
colorFrom: green
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
license: mit
---
# Andrej Janchevski β€” PhD Research
Live demos for the PhD thesis _Scalable Methods for Knowledge Graph Reasoning and Generation_ (Andrej Janchevski, EPFL, 2025). The thesis is mirrored at [infoscience.epfl.ch](https://infoscience.epfl.ch/entities/publication/87acf391-feef-43a0-b665-7f2f0bc70b2c); a CV is rendered at `/cv` from `docs/cvAndrejJanchevski.pdf`.
The site is a single Django + Vue Docker container. The Django backend serves a stateless REST API at `/api/v1/*` and WhiteNoise serves the built Vue SPA on every other path β€” same origin, no CORS in production. Deployment target: Hugging Face [Space](docs/glossary.md#hf-space) `Bani57/website` β†’ <https://bani57-website.hf.space>.
## What's in the demos
| Demo | Thesis | What it does |
|---|---|---|
| [COINs](docs/glossary.md#coins) β€” KG reasoning | Β§3.1 | Link prediction and multi-hop / intersection query answering on FB15k-237, WN18RR and NELL-995, with six embedding algorithms (TransE, DistMult, ComplEx, RotatE, Q2B, KBGAT). |
| [MultiProxAn](docs/glossary.md#multiproxan) β€” graph generation | Β§4.3 | Discrete denoising diffusion for molecular and synthetic graphs, with an outer Gibbs loop (MultiProx) that round-trips through `/continue` for live previews. |
| KG anomaly correction | Β§4.4 | Diffusion-based denoising of knowledge-graph subgraphs with a per-frame KG log-likelihood metric from the frozen COINs link ranker. |
## Layout
```
.
β”œβ”€β”€ Dockerfile, environment.yml, docker-compose.yml, entrypoint.sh, .dockerignore
β”œβ”€β”€ README.md # this file (also the HF Space landing card)
β”œβ”€β”€ src/backend/ # Django REST API
β”œβ”€β”€ src/frontend/ # Vue 3 SPA
β”œβ”€β”€ src/research/ # research code, imported via sys.path
β”œβ”€β”€ scripts/ # one-off helpers (checkpoint upload, motif export)
β”œβ”€β”€ docs/ # technical documentation (start at docs/README.md)
└── plans/ # implementation plans for major work
```
## Quick start
### Option A β€” Docker (production-equivalent)
```bash
cp .env.example .env
python -c "import secrets; print('DJANGO_SECRET_KEY=' + secrets.token_urlsafe(50))" >> .env
docker compose up --build
```
`http://localhost:7860`. First build is ~20–30 minutes (mamba env solve, GPU torch wheels, frontend bundle, ~5.4 GB checkpoint pull from HF Hub). Subsequent runs reuse layer cache and the `checkpoints` named volume.
### Option B β€” local Python + Vite (dev)
```bash
mamba env create -n website_c -f environment.yml
mamba activate website_c
pip install --extra-index-url https://download.pytorch.org/whl/cu118 -r src/backend/requirements.txt
( cd src/backend && DJANGO_DEBUG=True python manage.py runserver 8000 ) &
( cd src/frontend && npm install && npm run dev )
```
Backend on `:8000`, Vite on `:5173`. The dev frontend env file points the SPA at the local backend.
Full instructions: [`docs/guides/local-development.md`](docs/guides/local-development.md).
## Documentation
The [`docs/`](docs/) directory holds the full documentation set, organized by [Diataxis](https://diataxis.fr) document type:
- [`docs/README.md`](docs/README.md) β€” index and routing.
- [`docs/glossary.md`](docs/glossary.md) β€” domain terms (COINs, MultiProxAn, query structures, SSE, inference lock, …).
- [`docs/explanation/`](docs/explanation/) β€” architecture, research methods, inference lifecycle.
- [`docs/reference/`](docs/reference/) β€” API, SSE protocol, backend services, frontend modules.
- [`docs/guides/`](docs/guides/) β€” local development, deployment.
- [`docs/api.yaml`](docs/api.yaml) β€” OpenAPI 3.0.3 source of truth for the REST API.
- [`docs/postman/`](docs/postman/) β€” Postman collection and environment for hand-testing.
The Django backend has its own README at [`src/backend/README.md`](src/backend/README.md) and the Vue SPA at [`src/frontend/README.md`](src/frontend/README.md). Both link back to `docs/` for the deeper material.
## Deploying
`git push hf master:main` to the Space remote. See [`docs/guides/deploy.md`](docs/guides/deploy.md) for the full procedure (Space secrets, checkpoint refresh on HF Hub, rollback, persistent storage option).
## License
MIT for the website code. The PhD thesis and individual research methods retain their original publication terms; see the thesis PDF.