Skip to main content

KonfAI Apps

konfai-apps is the standalone package for packaged KonfAI workflows.

It is the layer you use when a low-level KonfAI workflow is already stable and you want a cleaner interface for:

  • local inference and evaluation
  • reusable app packaging
  • remote execution through a FastAPI server
  • integration in external tools such as 3D Slicer or lightweight clients

In the KonfAI repository, the split is intentional:

  • konfai = the low-level workflow engine
  • konfai-apps = the packaged app runtime
  • apps/ = a collection of concrete published apps

What This Package Provides

konfai-apps ships three interfaces:

  • konfai-apps for local or remote app execution
  • konfai-apps-server for hosting apps behind an HTTP API
  • the Python API under konfai_apps

This package depends on the core konfai framework, but it is versioned and tested as a separate runtime surface.

Installation

From PyPI:

python -m pip install konfai-apps

From a local checkout of this monorepo:

git clone https://github.com/fideus-labs/KonfAI.git
cd KonfAI
python -m pip install -e .
python -m pip install -e ./konfai-apps

Check the entrypoints:

konfai-apps --help
konfai-apps-server --help

App Identifiers

The app argument accepted by konfai-apps supports three main forms:

  • Hugging Face app: repo_id:app_name
  • local app directory: /path/to/my_app
  • remote app execution: same app identifier, plus --host ...

Examples:

konfai-apps infer VBoussot/ImpactSynth:CBCT ...
konfai-apps infer /data/apps/MyApp ...
konfai-apps infer VBoussot/ImpactSynth:CBCT --host 127.0.0.1 --port 8000 ...

Quick Start

Local inference

konfai-apps infer VBoussot/ImpactSynth:CBCT \
  -i input.mha \
  -o ./Output \
  --gpu 0

Evaluation

konfai-apps eval VBoussot/ImpactSynth:CBCT \
  -i input.mha \
  --gt gt.mha \
  --mask mask.mha \
  -o ./Evaluation \
  --gpu 0

Full pipeline

konfai-apps pipeline VBoussot/ImpactSynth:CBCT \
  -i input.mha \
  --gt gt.mha \
  --mask mask.mha \
  -o ./Output \
  -uncertainty \
  --gpu 0

Fine-tuning

konfai-apps fine-tune my_app MyCustomApp \
  -d ./Dataset \
  -o ./FineTune \
  --epochs 10 \
  --gpu 0

Main Commands

The CLI is organized around the packaged workflows available inside an app:

  • infer
  • eval
  • uncertainty
  • pipeline
  • fine-tune

Common execution options:

  • --gpu 0 or --gpu 0 1
  • --cpu N
  • --download
  • --force_update
  • --quiet

Workflow-specific config overrides:

  • --prediction-file
  • --evaluation-file
  • --uncertainty-file

Python API

The same runtime is available from Python:

from pathlib import Path

from konfai_apps import KonfAIApp

app = KonfAIApp("VBoussot/ImpactSynth:CBCT", download=False, force_update=False)
app.infer(
    inputs=[[Path("input.mha")]],
    output=Path("./Output"),
    gpu=[0],
    cpu=None,
    quiet=False,
    tmp_dir=None,
    ensemble=0,
    ensemble_models=[],
    tta=0,
    mc=0,
    uncertainty=False,
    prediction_file="Prediction.yml",
)

For remote execution:

from konfai import RemoteServer
from konfai_apps import KonfAIAppClient

client = KonfAIAppClient(
    "VBoussot/ImpactSynth:CBCT",
    RemoteServer("127.0.0.1", 8000, "secret"),
)

Remote Server

konfai-apps-server exposes packaged apps through a FastAPI service.

Minimal example:

export KONFAI_API_TOKEN="secret"
konfai-apps-server \
  --host 0.0.0.0 \
  --port 8000 \
  --apps ./konfai-apps/tests/assets/apps.json

Once the server is running, the client switches to remote mode as soon as --host is provided:

konfai-apps infer VBoussot/ImpactSynth:CBCT \
  -i input.mha \
  -o ./Output \
  --host 127.0.0.1 \
  --port 8000 \
  --token secret \
  --cpu 1

The remote flow is:

  1. upload inputs and parameters
  2. schedule the job on the server
  3. stream logs back to the client
  4. download the packaged result archive
  5. extract the final outputs locally

What a KonfAI App Contains

A typical app directory contains:

my_app/
├── app.json
├── Prediction.yml
├── Evaluation.yml            # optional
├── Uncertainty.yml           # optional
├── checkpoint.pt             # one or more checkpoints
└── custom Python modules     # optional

app.json stores metadata such as:

  • display name
  • description
  • short description
  • TTA capability
  • MC-dropout capability
  • optional UI-oriented metadata

The exact app authoring model is documented in the main repository under apps/ and in the Sphinx docs.

Repository Layout

Inside this monorepo:

This is why the folder is named konfai-apps and not just apps: the package is the runtime, while apps/ is the catalog of concrete apps.

Development

Install both packages in editable mode:

python -m pip install -e .
python -m pip install -e ./konfai-apps

Run the package test suite:

pytest -q konfai-apps/tests

The tests are split into:

  • konfai-apps/tests/unit
  • konfai-apps/tests/integration

GitHub Actions also separates the package from the core repository workflow:

  • .github/workflows/konfai_ci.yml
  • .github/workflows/konfai_apps_ci.yml

Related Documentation

Useful entry points in the main repository:

Current Scope

konfai-apps is intentionally focused on packaged workflow execution.

It is not meant to replace the low-level konfai workflow authoring interface

Its job is narrower and more operational: turn a mature KonfAI workflow into a reproducible, distributable application surface.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

konfai_apps-1.7.0.tar.gz (6.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

konfai_apps-1.7.0-py3-none-any.whl (82.7 kB view details)

Uploaded Python 3

File details

Details for the file konfai_apps-1.7.0.tar.gz.

File metadata

  • Download URL: konfai_apps-1.7.0.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for konfai_apps-1.7.0.tar.gz
Algorithm Hash digest
SHA256 c7a70c226dd57d2db53c410e8599928e888ed0de26e94d1c21f2b99cfe1ea3b7
MD5 7634be40cc00f12c4f04e319735b0125
BLAKE2b-256 398295a9b1f9095dd5cf3ac9f432a6c5355991ca58225ebb61d76062392a6dff

See more details on using hashes here.

Provenance

The following attestation bundles were made for konfai_apps-1.7.0.tar.gz:

Publisher: publish.yml on fideus-labs/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file konfai_apps-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: konfai_apps-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 82.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for konfai_apps-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09afd0807b4884160888d61dbf084038f884aebdbcbf6b87da4febe6cd43d94a
MD5 002c4f977ddc74d96de58a6ab210eeaf
BLAKE2b-256 5b52b20fd8e8b6fd4ca33a99b839ab137200b118f2bdccd1e74b7253d662cff8

See more details on using hashes here.

Provenance

The following attestation bundles were made for konfai_apps-1.7.0-py3-none-any.whl:

Publisher: publish.yml on fideus-labs/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.8.1

2 files

1.8.0

2 files

This release

1.7.0 This release

2 files

1.6.0

2 files

1.5.9

2 files

1.5.8

2 files

1.5.7

2 files

1.5.6

2 files

1.5.5

2 files

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