DIAL Transformer is an INTERSECT capability service that applies configurable data transforms for DIAL workflows. It currently supports linear and logarithmic transforms, and includes a linear bounds-calculation path for generating regular grid-style bounds from incoming bounding boxes.
- Install uv.
- Sync dependencies:
uv sync- Run tests:
uv run pytest -q- Run the service:
uv run python -m intersect_dial_transformer --config local-conf.jsonBuild the image and run directly:
docker build -t dial-transformer . && docker run -e DIAL_TRANSFORMER_CONFIG_FILE=/local-conf.docker.json -v ${PWD}/local-conf.docker.json:/local-conf.docker.json dial-transformerRun with Compose:
docker compose up --buildRun in detached mode:
docker compose up --build -dStop and clean up:
docker compose downNotes:
- The service image is built from Dockerfile.
- The container should set
DIAL_TRANSFORMER_CONFIG_FILE=/local-conf.docker.json. - Compose mounts
./local-conf.docker.jsonto/local-conf.docker.json.
Everything here is an @intersect_message.
- initialize_transform(params: InitializeTransformParams) -> None
- calculate_bounds(params: CalculateBoundsParams) -> list[list[float]]
- transform(params: TransformParams) -> TransformResult
- inverse_transform(params: InverseTransformParams) -> InverseTransformResult
- InitializeTransformParams
- origins: list[float]
- type: 'linear' | 'logarithmic'
- linear requires bin_sizes
- logarithmic requires num_bins
- CalculateBoundsParams
- input_bounds: list[[min, max]] per dimension
- output_bounds: list[[min, max]] per dimension (updated by service)
- type: 'linear'