NatML
Search…
MLCloudModel
class NatSuite.ML.Internal.MLCloudModel : MLModel
The MLCloudModel represents an ML model that makes predictions server-side with NatML Hub. As such, it forms the basis for implementing Cloud predictors in code.

Inspecting Feature Types

Edge models provide information about their expected input and output feature types. This type information is crucial for writing Edge predictors.

Input Features

1
/// <summary>
2
/// Model input feature types.
3
/// </summary>
4
MLFeatureType[] inputs { get; }
Copied!
Refer to the Input Features section of the MLModel class for more information.
Cloud models currently do not report any input feature types.

Output Features

1
/// <summary>
2
/// Model output feature types.
3
/// </summary>
4
MLFeatureType[] outputs { get; }
Copied!
Refer to the Output Features section of the MLModel class for more information.
Cloud models currently do not report any output feature types.

Inspecting Metadata

1
/// <summary>
2
/// Get the model metadata dictionary.
3
/// </summary>
4
IReadOnlyDictionary<string, string> metadata { get; }
Copied!
Refer to the Inspecting Metadata section of the MLModel class for more information.
Cloud models currently do not report any metadata.

Making Cloud Predictions

1
/// <summary>
2
/// Make a prediction on one or more Cloud ML features.
3
/// </summary>
4
/// <param name="inputs">Input Cloud ML features.</param>
5
/// <returns>Output Cloud ML features.</returns>
6
Task<MLFeatureCollection<MLCloudFeature>> Predict (params MLCloudFeature[] inputs);
Copied!
INCOMPLETE.
1
/// <summary>
2
/// Make a prediction on one or more Cloud ML features.
3
/// </summary>
4
/// <param name="inputs">Input Cloud ML features.</param>
5
/// <param name="options">Hub prediction options.</param>
6
/// <returns>Output Cloud ML features.</returns>
7
Task<MLFeatureCollection<MLCloudFeature>> Predict (MLCloudFeature[] inputs, PredictionOptions options);
Copied!

Prediction Options

1
public class PredictionOptions { ... }
Copied!
INCOMPLETE.

Async Predictions

1
/// <summary>
2
/// Perform prediction asynchronously.
3
/// </summary>
4
bool asyncPrediction { get; }
Copied!
INCOMPLETE.
This option should be enabled for predictions that take more than 10 seconds. See the Graph API docs for more info.

Disposing the Model

1
/// <summary>
2
/// Dispose the model and release resources.
3
/// </summary>
4
void Dispose ();
Copied!
Refer to the Disposing the Model section of the MLModel class for more information.

Implementing Cloud Predictions

INCOMPLETE.