Method RegisterMetricDefinition
RegisterMetricDefinition(string, string, Guid)
Creates a metric type, which can be used to produce metrics during the simulation. See ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition), ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition), ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition)
Declaration
public static MetricDefinition RegisterMetricDefinition(string name, string description = null, Guid id = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Human readable annotation spec name (e.g. sementic_segmentation, instance_segmentation, etc.) |
| string | description | Description of the annotation. |
| Guid | id | The ID for this metric. This allows metric types to be shared across simulations and sequences. |
Returns
| Type | Description |
|---|---|
| MetricDefinition | A MetricDefinition, which can be used during this simulation to report metrics. |
RegisterMetricDefinition<TSpec>(string, TSpec[], string, Guid)
Creates a metric type, which can be used to produce metrics during the simulation. See ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition), ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition), ReportMetric<T>(MetricDefinition, T[]), ReportMetricAsync(MetricDefinition)
Declaration
public static MetricDefinition RegisterMetricDefinition<TSpec>(string name, TSpec[] specValues, string description = null, Guid id = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Human readable annotation spec name (e.g. sementic_segmentation, instance_segmentation, etc.) |
| TSpec[] | specValues | Format-specific specification for the metric values. Will be converted to json automatically. |
| string | description | Description of the annotation. |
| Guid | id | The ID for this metric. This allows metric types to be shared across simulations and sequences. |
Returns
| Type | Description |
|---|---|
| MetricDefinition | A MetricDefinition, which can be used during this simulation to report metrics. |
Type Parameters
| Name | Description |
|---|---|
| TSpec | The type of the specValues struct to write. |