semvec/pypi-packages huggingface dataset:
distributed-eaas-apis 0.1.0
"Public API definitions of Distributed EaaS."
License: Apache License 2.0
Requires Python: >=3.8
Keywords: eaas

# Distributed EaaS APIs

This repository contains public API definitions of Distributed EaaS.

## Usage

### Endpoint functions

Each endpoint provides following functions.

| Path       | Method | Request schema        | Response schema        | Description                |
| :--------- | :----- | :-------------------- | :--------------------- | :------------------------- |
| `/`        | GET    | None                  | `Metadata`             | Obtains metric's metadata. |
| `/process` | POST   | `ProcessRequest[...]` | `ProcessResponse[...]` | Calculates metric scores.  |

### Requests and responses

Each metric service accepts a minibatch of examples formed as `ProcessRequest[...]`.
This type takes three parameters `Config`, `Example`, and `Statistics` to represent a
request message of each metric service.

Results of the metric service are represented by `ProcessResponse[...]` with two
parameters `Statistics` and `Summary`.

Each type parameter represents following information:

* `Config`:
  Detailed configuration of the metric.
* `Example`:
  Individual input examples (e.g., a pair of hypothesis and reference).
* `Statistics`:
  Sufficient statistics of the metric calculated by each `Example`, or obtained by
  aggregating multiple `Statistics`. Aggregation is meaningful only when all
  `Statistics` are calculated by the same `Config`.
* `Summary`:
  Summarized values of the metric (e.g., the final score) calculated by a `Statistics`.

### Example

See [`example`](./example) directory.