#[non_exhaustive]pub struct PythonPackageSpec {
pub executor_image_uri: String,
pub package_uris: Vec<String>,
pub python_module: String,
pub args: Vec<String>,
pub env: Vec<EnvVar>,
/* private fields */
}job-service only.Expand description
The spec of a Python packaged code.
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.executor_image_uri: StringRequired. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users’ various use cases. See the list of pre-built containers for training. You must use an image from this list.
package_uris: Vec<String>Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.
python_module: StringRequired. The Python module name to run after installing the packages.
args: Vec<String>Command line arguments to be passed to the Python task.
env: Vec<EnvVar>Environment variables to be passed to the python module. Maximum limit is 100.
Implementations§
Source§impl PythonPackageSpec
impl PythonPackageSpec
Sourcepub fn set_executor_image_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_executor_image_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of executor_image_uri.
§Example
let x = PythonPackageSpec::new().set_executor_image_uri("example");Sourcepub fn set_package_uris<T, V>(self, v: T) -> Self
pub fn set_package_uris<T, V>(self, v: T) -> Self
Sets the value of package_uris.
§Example
let x = PythonPackageSpec::new().set_package_uris(["a", "b", "c"]);Sourcepub fn set_python_module<T: Into<String>>(self, v: T) -> Self
pub fn set_python_module<T: Into<String>>(self, v: T) -> Self
Sets the value of python_module.
§Example
let x = PythonPackageSpec::new().set_python_module("example");Trait Implementations§
Source§impl Clone for PythonPackageSpec
impl Clone for PythonPackageSpec
Source§fn clone(&self) -> PythonPackageSpec
fn clone(&self) -> PythonPackageSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PythonPackageSpec
impl Debug for PythonPackageSpec
Source§impl Default for PythonPackageSpec
impl Default for PythonPackageSpec
Source§fn default() -> PythonPackageSpec
fn default() -> PythonPackageSpec
Source§impl Message for PythonPackageSpec
impl Message for PythonPackageSpec
Source§impl PartialEq for PythonPackageSpec
impl PartialEq for PythonPackageSpec
impl StructuralPartialEq for PythonPackageSpec
Auto Trait Implementations§
impl Freeze for PythonPackageSpec
impl RefUnwindSafe for PythonPackageSpec
impl Send for PythonPackageSpec
impl Sync for PythonPackageSpec
impl Unpin for PythonPackageSpec
impl UnsafeUnpin for PythonPackageSpec
impl UnwindSafe for PythonPackageSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request