#[non_exhaustive]pub struct CreateLabelingJobInput {
pub labeling_job_name: Option<String>,
pub label_attribute_name: Option<String>,
pub input_config: Option<LabelingJobInputConfig>,
pub output_config: Option<LabelingJobOutputConfig>,
pub role_arn: Option<String>,
pub label_category_config_s3_uri: Option<String>,
pub stopping_conditions: Option<LabelingJobStoppingConditions>,
pub labeling_job_algorithms_config: Option<LabelingJobAlgorithmsConfig>,
pub human_task_config: Option<HumanTaskConfig>,
pub tags: Option<Vec<Tag>>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.labeling_job_name: Option<String>
The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job names must be unique within an Amazon Web Services account and region. LabelingJobName
is not case sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth.
label_attribute_name: Option<String>
The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The LabelAttributeName
must meet the following requirements.
-
The name can't end with "-metadata".
-
If you are using one of the following built-in task types, the attribute name must end with "-ref". If the task type you are using is not listed below, the attribute name must not end with "-ref".
-
Image semantic segmentation (
SemanticSegmentation)
, and adjustment (AdjustmentSemanticSegmentation
) and verification (VerificationSemanticSegmentation
) labeling jobs for this task type. -
Video frame object detection (
VideoObjectDetection
), and adjustment and verification (AdjustmentVideoObjectDetection
) labeling jobs for this task type. -
Video frame object tracking (
VideoObjectTracking
), and adjustment and verification (AdjustmentVideoObjectTracking
) labeling jobs for this task type. -
3D point cloud semantic segmentation (
3DPointCloudSemanticSegmentation
), and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation
) labeling jobs for this task type. -
3D point cloud object tracking (
3DPointCloudObjectTracking
), and adjustment and verification (Adjustment3DPointCloudObjectTracking
) labeling jobs for this task type.
-
If you are creating an adjustment or verification labeling job, you must use a different LabelAttributeName
than the one used in the original labeling job. The original labeling job is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about adjustment and verification labeling jobs, see Verify and Adjust Labels.
input_config: Option<LabelingJobInputConfig>
Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects.
You must specify at least one of the following: S3DataSource
or SnsDataSource
.
-
Use
SnsDataSource
to specify an SNS input topic for a streaming labeling job. If you do not specify and SNS input topic ARN, Ground Truth will create a one-time labeling job that stops after all data objects in the input manifest file have been labeled. -
Use
S3DataSource
to specify an input manifest file for both streaming and one-time labeling jobs. Adding anS3DataSource
is optional if you useSnsDataSource
to create a streaming labeling job.
If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, personal information or protected health information. Use ContentClassifiers
to specify that your data is free of personally identifiable information and adult content.
output_config: Option<LabelingJobOutputConfig>
The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any.
role_arn: Option<String>
The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.
label_category_config_s3_uri: Option<String>
The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects.
For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs.
For named entity recognition jobs, in addition to "labels"
, you must provide worker instructions in the label category configuration file using the "instructions"
parameter: "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}
. For details and an example, see Create a Named Entity Recognition Labeling Job (API) .
For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1
, label_2
,...
,label_n
with your label categories.
{
"document-version": "2018-11-28",
"labels": \[{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}\]
}
Note the following about the label category configuration file:
-
For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one.
-
Each label category must be unique, you cannot specify duplicate label categories.
-
If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include
auditLabelAttributeName
in the label category configuration. Use this parameter to enter theLabelAttributeName
of the labeling job you want to adjust or verify annotations of.
stopping_conditions: Option<LabelingJobStoppingConditions>
A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling.
labeling_job_algorithms_config: Option<LabelingJobAlgorithmsConfig>
Configures the information required to perform automated data labeling.
human_task_config: Option<HumanTaskConfig>
Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count).
An array of key/value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.
Implementations§
Source§impl CreateLabelingJobInput
impl CreateLabelingJobInput
Sourcepub fn labeling_job_name(&self) -> Option<&str>
pub fn labeling_job_name(&self) -> Option<&str>
The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job names must be unique within an Amazon Web Services account and region. LabelingJobName
is not case sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth.
Sourcepub fn label_attribute_name(&self) -> Option<&str>
pub fn label_attribute_name(&self) -> Option<&str>
The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The LabelAttributeName
must meet the following requirements.
-
The name can't end with "-metadata".
-
If you are using one of the following built-in task types, the attribute name must end with "-ref". If the task type you are using is not listed below, the attribute name must not end with "-ref".
-
Image semantic segmentation (
SemanticSegmentation)
, and adjustment (AdjustmentSemanticSegmentation
) and verification (VerificationSemanticSegmentation
) labeling jobs for this task type. -
Video frame object detection (
VideoObjectDetection
), and adjustment and verification (AdjustmentVideoObjectDetection
) labeling jobs for this task type. -
Video frame object tracking (
VideoObjectTracking
), and adjustment and verification (AdjustmentVideoObjectTracking
) labeling jobs for this task type. -
3D point cloud semantic segmentation (
3DPointCloudSemanticSegmentation
), and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation
) labeling jobs for this task type. -
3D point cloud object tracking (
3DPointCloudObjectTracking
), and adjustment and verification (Adjustment3DPointCloudObjectTracking
) labeling jobs for this task type.
-
If you are creating an adjustment or verification labeling job, you must use a different LabelAttributeName
than the one used in the original labeling job. The original labeling job is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about adjustment and verification labeling jobs, see Verify and Adjust Labels.
Sourcepub fn input_config(&self) -> Option<&LabelingJobInputConfig>
pub fn input_config(&self) -> Option<&LabelingJobInputConfig>
Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects.
You must specify at least one of the following: S3DataSource
or SnsDataSource
.
-
Use
SnsDataSource
to specify an SNS input topic for a streaming labeling job. If you do not specify and SNS input topic ARN, Ground Truth will create a one-time labeling job that stops after all data objects in the input manifest file have been labeled. -
Use
S3DataSource
to specify an input manifest file for both streaming and one-time labeling jobs. Adding anS3DataSource
is optional if you useSnsDataSource
to create a streaming labeling job.
If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, personal information or protected health information. Use ContentClassifiers
to specify that your data is free of personally identifiable information and adult content.
Sourcepub fn output_config(&self) -> Option<&LabelingJobOutputConfig>
pub fn output_config(&self) -> Option<&LabelingJobOutputConfig>
The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any.
Sourcepub fn role_arn(&self) -> Option<&str>
pub fn role_arn(&self) -> Option<&str>
The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.
Sourcepub fn label_category_config_s3_uri(&self) -> Option<&str>
pub fn label_category_config_s3_uri(&self) -> Option<&str>
The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects.
For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs.
For named entity recognition jobs, in addition to "labels"
, you must provide worker instructions in the label category configuration file using the "instructions"
parameter: "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}
. For details and an example, see Create a Named Entity Recognition Labeling Job (API) .
For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1
, label_2
,...
,label_n
with your label categories.
{
"document-version": "2018-11-28",
"labels": \[{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}\]
}
Note the following about the label category configuration file:
-
For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one.
-
Each label category must be unique, you cannot specify duplicate label categories.
-
If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include
auditLabelAttributeName
in the label category configuration. Use this parameter to enter theLabelAttributeName
of the labeling job you want to adjust or verify annotations of.
Sourcepub fn stopping_conditions(&self) -> Option<&LabelingJobStoppingConditions>
pub fn stopping_conditions(&self) -> Option<&LabelingJobStoppingConditions>
A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling.
Sourcepub fn labeling_job_algorithms_config(
&self,
) -> Option<&LabelingJobAlgorithmsConfig>
pub fn labeling_job_algorithms_config( &self, ) -> Option<&LabelingJobAlgorithmsConfig>
Configures the information required to perform automated data labeling.
Sourcepub fn human_task_config(&self) -> Option<&HumanTaskConfig>
pub fn human_task_config(&self) -> Option<&HumanTaskConfig>
Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count).
An array of key/value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tags.is_none()
.
Source§impl CreateLabelingJobInput
impl CreateLabelingJobInput
Sourcepub fn builder() -> CreateLabelingJobInputBuilder
pub fn builder() -> CreateLabelingJobInputBuilder
Creates a new builder-style object to manufacture CreateLabelingJobInput
.
Trait Implementations§
Source§impl Clone for CreateLabelingJobInput
impl Clone for CreateLabelingJobInput
Source§fn clone(&self) -> CreateLabelingJobInput
fn clone(&self) -> CreateLabelingJobInput
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateLabelingJobInput
impl Debug for CreateLabelingJobInput
Source§impl PartialEq for CreateLabelingJobInput
impl PartialEq for CreateLabelingJobInput
Source§fn eq(&self, other: &CreateLabelingJobInput) -> bool
fn eq(&self, other: &CreateLabelingJobInput) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CreateLabelingJobInput
Auto Trait Implementations§
impl Freeze for CreateLabelingJobInput
impl RefUnwindSafe for CreateLabelingJobInput
impl Send for CreateLabelingJobInput
impl Sync for CreateLabelingJobInput
impl Unpin for CreateLabelingJobInput
impl UnwindSafe for CreateLabelingJobInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);