IProgressChannel Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A common interface for progress reporting. It is expected that the progress channel interface is used from only one thread.
Supported workflow:
- Create the channel via StartProgressChannel(String).
- Call SetHeader(ProgressHeader, Action<IProgressEntry>) as many times as desired (including 0). Each call to SetHeader(ProgressHeader, Action<IProgressEntry>) supersedes the previous one.
- Report checkpoints (0 or more) by calling Checkpoint(Nullable<Double>[]).
- Repeat steps 2-3 as often as necessary.
- Dispose the channel.
public interface IProgressChannel : IDisposable, Microsoft.ML.Runtime.IProgressChannelProvider
type IProgressChannel = interface
interface IProgressChannelProvider
interface IDisposable
Public Interface IProgressChannel
Implements IDisposable, IProgressChannelProvider
- Implements
Methods
Checkpoint(Nullable<Double>[]) |
Submit a 'checkpoint' entry. These entries are guaranteed to be delivered to the progress listener, if it is interested. Typically, this would contain some intermediate metrics, that are only calculated at certain moments ('checkpoints') of the computation. For example, SDCA may report a checkpoint every time it computes the loss, or LBFGS may report a checkpoint every iteration. The only parameter,
|
SetHeader(ProgressHeader, Action<IProgressEntry>) |
Set up the reporting structure:
It is acceptable to call SetHeader(ProgressHeader, Action<IProgressEntry>) multiple times (or none), regardless of whether the calculation is running
or not. Because of synchronization, the computation should not deny calls to the 'old' |
StartProgressChannel(String) |
Create a progress channel for a computation named |