#[non_exhaustive]pub struct S3ModelDataSource {
pub s3_uri: Option<String>,
pub s3_data_type: Option<S3ModelDataType>,
pub compression_type: Option<ModelCompressionType>,
pub model_access_config: Option<ModelAccessConfig>,
pub hub_access_config: Option<InferenceHubAccessConfig>,
pub manifest_s3_uri: Option<String>,
pub e_tag: Option<String>,
pub manifest_etag: Option<String>,
}
Expand description
Specifies the S3 location of ML model data to deploy.
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.s3_uri: Option<String>
Specifies the S3 path of ML model data to deploy.
s3_data_type: Option<S3ModelDataType>
Specifies the type of ML model data to deploy.
If you choose S3Prefix
, S3Uri
identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix as part of the ML model data to deploy. A valid key name prefix identified by S3Uri
always ends with a forward slash (/).
If you choose S3Object
, S3Uri
identifies an object that is the ML model data to deploy.
compression_type: Option<ModelCompressionType>
Specifies how the ML model data is prepared.
If you choose Gzip
and choose S3Object
as the value of S3DataType
, S3Uri
identifies an object that is a gzip-compressed TAR archive. SageMaker will attempt to decompress and untar the object during model deployment.
If you choose None
and chooose S3Object
as the value of S3DataType
, S3Uri
identifies an object that represents an uncompressed ML model to deploy.
If you choose None and choose S3Prefix
as the value of S3DataType
, S3Uri
identifies a key name prefix, under which all objects represents the uncompressed ML model to deploy.
If you choose None, then SageMaker will follow rules below when creating model data files under /opt/ml/model directory for use by your inference code:
-
If you choose
S3Object
as the value ofS3DataType
, then SageMaker will split the key of the S3 object referenced byS3Uri
by slash (/), and use the last part as the filename of the file holding the content of the S3 object. -
If you choose
S3Prefix
as the value ofS3DataType
, then for each S3 object under the key name pefix referenced byS3Uri
, SageMaker will trim its key by the prefix, and use the remainder as the path (relative to/opt/ml/model
) of the file holding the content of the S3 object. SageMaker will split the remainder by slash (/), using intermediate parts as directory names and the last part as filename of the file holding the content of the S3 object. -
Do not use any of the following as file names or directory names:
-
An empty or blank string
-
A string which contains null bytes
-
A string longer than 255 bytes
-
A single dot (
.
) -
A double dot (
..
)
-
-
Ambiguous file names will result in model deployment failure. For example, if your uncompressed ML model consists of two S3 objects
s3://mybucket/model/weights
ands3://mybucket/model/weights/part1
and you specifys3://mybucket/model/
as the value ofS3Uri
andS3Prefix
as the value ofS3DataType
, then it will result in name clash between/opt/ml/model/weights
(a regular file) and/opt/ml/model/weights/
(a directory). -
Do not organize the model artifacts in S3 console using folders. When you create a folder in S3 console, S3 creates a 0-byte object with a key set to the folder name you provide. They key of the 0-byte object ends with a slash (/) which violates SageMaker restrictions on model artifact file names, leading to model deployment failure.
model_access_config: Option<ModelAccessConfig>
Specifies the access configuration file for the ML model. You can explicitly accept the model end-user license agreement (EULA) within the ModelAccessConfig
. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
hub_access_config: Option<InferenceHubAccessConfig>
Configuration information for hub access.
manifest_s3_uri: Option<String>
The Amazon S3 URI of the manifest file. The manifest file is a CSV file that stores the artifact locations.
e_tag: Option<String>
The ETag associated with S3 URI.
manifest_etag: Option<String>
The ETag associated with Manifest S3 URI.
Implementations§
Source§impl S3ModelDataSource
impl S3ModelDataSource
Sourcepub fn s3_data_type(&self) -> Option<&S3ModelDataType>
pub fn s3_data_type(&self) -> Option<&S3ModelDataType>
Specifies the type of ML model data to deploy.
If you choose S3Prefix
, S3Uri
identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix as part of the ML model data to deploy. A valid key name prefix identified by S3Uri
always ends with a forward slash (/).
If you choose S3Object
, S3Uri
identifies an object that is the ML model data to deploy.
Sourcepub fn compression_type(&self) -> Option<&ModelCompressionType>
pub fn compression_type(&self) -> Option<&ModelCompressionType>
Specifies how the ML model data is prepared.
If you choose Gzip
and choose S3Object
as the value of S3DataType
, S3Uri
identifies an object that is a gzip-compressed TAR archive. SageMaker will attempt to decompress and untar the object during model deployment.
If you choose None
and chooose S3Object
as the value of S3DataType
, S3Uri
identifies an object that represents an uncompressed ML model to deploy.
If you choose None and choose S3Prefix
as the value of S3DataType
, S3Uri
identifies a key name prefix, under which all objects represents the uncompressed ML model to deploy.
If you choose None, then SageMaker will follow rules below when creating model data files under /opt/ml/model directory for use by your inference code:
-
If you choose
S3Object
as the value ofS3DataType
, then SageMaker will split the key of the S3 object referenced byS3Uri
by slash (/), and use the last part as the filename of the file holding the content of the S3 object. -
If you choose
S3Prefix
as the value ofS3DataType
, then for each S3 object under the key name pefix referenced byS3Uri
, SageMaker will trim its key by the prefix, and use the remainder as the path (relative to/opt/ml/model
) of the file holding the content of the S3 object. SageMaker will split the remainder by slash (/), using intermediate parts as directory names and the last part as filename of the file holding the content of the S3 object. -
Do not use any of the following as file names or directory names:
-
An empty or blank string
-
A string which contains null bytes
-
A string longer than 255 bytes
-
A single dot (
.
) -
A double dot (
..
)
-
-
Ambiguous file names will result in model deployment failure. For example, if your uncompressed ML model consists of two S3 objects
s3://mybucket/model/weights
ands3://mybucket/model/weights/part1
and you specifys3://mybucket/model/
as the value ofS3Uri
andS3Prefix
as the value ofS3DataType
, then it will result in name clash between/opt/ml/model/weights
(a regular file) and/opt/ml/model/weights/
(a directory). -
Do not organize the model artifacts in S3 console using folders. When you create a folder in S3 console, S3 creates a 0-byte object with a key set to the folder name you provide. They key of the 0-byte object ends with a slash (/) which violates SageMaker restrictions on model artifact file names, leading to model deployment failure.
Sourcepub fn model_access_config(&self) -> Option<&ModelAccessConfig>
pub fn model_access_config(&self) -> Option<&ModelAccessConfig>
Specifies the access configuration file for the ML model. You can explicitly accept the model end-user license agreement (EULA) within the ModelAccessConfig
. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
Sourcepub fn hub_access_config(&self) -> Option<&InferenceHubAccessConfig>
pub fn hub_access_config(&self) -> Option<&InferenceHubAccessConfig>
Configuration information for hub access.
Sourcepub fn manifest_s3_uri(&self) -> Option<&str>
pub fn manifest_s3_uri(&self) -> Option<&str>
The Amazon S3 URI of the manifest file. The manifest file is a CSV file that stores the artifact locations.
Sourcepub fn manifest_etag(&self) -> Option<&str>
pub fn manifest_etag(&self) -> Option<&str>
The ETag associated with Manifest S3 URI.
Source§impl S3ModelDataSource
impl S3ModelDataSource
Sourcepub fn builder() -> S3ModelDataSourceBuilder
pub fn builder() -> S3ModelDataSourceBuilder
Creates a new builder-style object to manufacture S3ModelDataSource
.
Trait Implementations§
Source§impl Clone for S3ModelDataSource
impl Clone for S3ModelDataSource
Source§fn clone(&self) -> S3ModelDataSource
fn clone(&self) -> S3ModelDataSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for S3ModelDataSource
impl Debug for S3ModelDataSource
Source§impl PartialEq for S3ModelDataSource
impl PartialEq for S3ModelDataSource
impl StructuralPartialEq for S3ModelDataSource
Auto Trait Implementations§
impl Freeze for S3ModelDataSource
impl RefUnwindSafe for S3ModelDataSource
impl Send for S3ModelDataSource
impl Sync for S3ModelDataSource
impl Unpin for S3ModelDataSource
impl UnwindSafe for S3ModelDataSource
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);