AnandInguva commented on issue #24042:
URL: https://github.com/apache/beam/issues/24042#issuecomment-1406794137
Part 1: Add API that accepts Singleton side input PCollection.
Part 2: Use case of the API. Example: `WatchFilePattern` transform with an
example.
Part 3: DLQ to catch errors.
Also, update documentation with
```
## Side Inputs to Update Models
From Beam 2.45.0, the RunInference PTransform will accept a side input of
`ModelMetadata`, which is a `NamedTuple` containing the `model_id` and
`model_name`.
* `model_id`: The model_id is used to load the models. It could be an URI
or path to the model.
* `model_name`: Unique identifier used to append the metrics. This should
be short relative to the model_id so that it can be attached to the metrics to
identify which model was used to calculate the metrics.
**Note**: The side input PCollection must be compatible with `AsSingleton`
view or the pipeline will result in error.
**Note**: If the main PCollection emits inputs and side input has yet to
receive inputs, the main PCollection will get buffered until there is
an update to the side input. This could happen with Global
windowed side inputs with data driven triggers such as `AfterCount`,
`AfterProcessingTime`. So until there is an update to the side input, emit the
default/initial model id that is used to pass the respective `ModelHandler` as
side input..
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]