#[non_exhaustive]pub struct GcsTrainingInput {
pub corpus_data_path: String,
pub query_data_path: String,
pub train_data_path: String,
pub test_data_path: String,
/* private fields */
}search-tuning-service only.Expand description
Cloud Storage training data input.
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.corpus_data_path: StringThe Cloud Storage corpus data which could be associated in train data.
The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
A newline delimited jsonl/ndjson file.
For search-tuning model, each line should have the _id, title
and text. Example:
{"_id": "doc1", title: "relevant doc", "text": "relevant text"}
query_data_path: StringThe gcs query data which could be associated in train data.
The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
A newline delimited jsonl/ndjson file.
For search-tuning model, each line should have the _id and text. Example: {“_id”: “query1”, “text”: “example query”}
train_data_path: StringCloud Storage training data path whose format should be
gs://<bucket_to_data>/<tsv_file_name>. The file should be in tsv
format. Each line should have the doc_id and query_id and score (number).
For search-tuning model, it should have the query-id corpus-id
score as tsv file header. The score should be a number in [0, inf+).
The larger the number is, the more relevant the pair is. Example:
query-id\tcorpus-id\tscorequery1\tdoc1\t1
test_data_path: StringCloud Storage test data. Same format as train_data_path. If not provided, a random 80/20 train/test split will be performed on train_data_path.
Implementations§
Source§impl GcsTrainingInput
impl GcsTrainingInput
Sourcepub fn set_corpus_data_path<T: Into<String>>(self, v: T) -> Self
pub fn set_corpus_data_path<T: Into<String>>(self, v: T) -> Self
Sets the value of corpus_data_path.
§Example
let x = GcsTrainingInput::new().set_corpus_data_path("example");Sourcepub fn set_query_data_path<T: Into<String>>(self, v: T) -> Self
pub fn set_query_data_path<T: Into<String>>(self, v: T) -> Self
Sets the value of query_data_path.
§Example
let x = GcsTrainingInput::new().set_query_data_path("example");Sourcepub fn set_train_data_path<T: Into<String>>(self, v: T) -> Self
pub fn set_train_data_path<T: Into<String>>(self, v: T) -> Self
Sets the value of train_data_path.
§Example
let x = GcsTrainingInput::new().set_train_data_path("example");Sourcepub fn set_test_data_path<T: Into<String>>(self, v: T) -> Self
pub fn set_test_data_path<T: Into<String>>(self, v: T) -> Self
Sets the value of test_data_path.
§Example
let x = GcsTrainingInput::new().set_test_data_path("example");Trait Implementations§
Source§impl Clone for GcsTrainingInput
impl Clone for GcsTrainingInput
Source§fn clone(&self) -> GcsTrainingInput
fn clone(&self) -> GcsTrainingInput
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 GcsTrainingInput
impl Debug for GcsTrainingInput
Source§impl Default for GcsTrainingInput
impl Default for GcsTrainingInput
Source§fn default() -> GcsTrainingInput
fn default() -> GcsTrainingInput
Source§impl Message for GcsTrainingInput
impl Message for GcsTrainingInput
Source§impl PartialEq for GcsTrainingInput
impl PartialEq for GcsTrainingInput
impl StructuralPartialEq for GcsTrainingInput
Auto Trait Implementations§
impl Freeze for GcsTrainingInput
impl RefUnwindSafe for GcsTrainingInput
impl Send for GcsTrainingInput
impl Sync for GcsTrainingInput
impl Unpin for GcsTrainingInput
impl UnsafeUnpin for GcsTrainingInput
impl UnwindSafe for GcsTrainingInput
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