nvflare.app_common.streamers.streamer_base module
- class BaseChunkConsumer[source]
Bases:
ObjectConsumerBase for chunk-based consumers.
Provides shared data-chunk size validation. Subclasses must implement
consume.
- class BaseChunkProducer[source]
Bases:
ObjectProducerBase for chunk-based producers.
Provides the common
process_repliesimplementation shared by FileStreamer and LogStreamer. Subclasses must implementproduce.- process_replies(replies, stream_ctx, fl_ctx)[source]
Called to process replies from receivers of the last Shareable object sent to them.
- Parameters:
replies – replies from receivers. It’s dict of site_name => reply
stream_ctx – stream context data
fl_ctx – the FLContext object
Returns: Any object or None
If None is returned, the streaming will continue; otherwise the streaming stops and the returned object is returned as the final result of the streaming.
- class StreamerBase[source]
Bases:
objectThis is the base class for all future streamers. This base class provides methods for accessing common properties in the StreamContext. When a streamer class is defined as a subclass of this base, then all such StreamContext accessing methods will be inherited.