pub struct ValidationSession { /* private fields */ }Implementations§
Source§impl ValidationSession
impl ValidationSession
pub fn id(&self) -> ValidationSessionID
pub fn name(&self) -> &str
pub fn description(&self) -> &str
pub fn dataset_id(&self) -> DatasetID
pub fn experiment_id(&self) -> ExperimentID
pub fn training_session_id(&self) -> TrainingSessionID
pub fn annotation_set_id(&self) -> AnnotationSetID
pub fn params(&self) -> &HashMap<String, Parameter>
pub fn task(&self) -> &Task
pub async fn metrics( &self, client: &Client, ) -> Result<HashMap<String, Parameter>, Error>
pub async fn set_metrics( &self, client: &Client, metrics: HashMap<String, Parameter>, ) -> Result<(), Error>
Sourcepub async fn upload_data(
&self,
client: &Client,
files: &[(String, PathBuf)],
folder: Option<&str>,
progress: Option<Sender<Progress>>,
) -> Result<(), Error>
pub async fn upload_data( &self, client: &Client, files: &[(String, PathBuf)], folder: Option<&str>, progress: Option<Sender<Progress>>, ) -> Result<(), Error>
Uploads files to this validation session’s data folder.
Breaking change: this method replaces the former upload.
It targets the new val.data.upload endpoint (which supports an optional
folder argument and uses session-scoped permissions). The semantics
differ from the old endpoint — the old upload cannot be silently
repointed because the wire shapes differ (singular session_id, folder
argument, different return shape).
§Arguments
client- The authenticated client instance.files- List of(filename, path)pairs to upload.folder- Optional logical subdirectory under the session data root.progress- Optional progress channel. EmitsProgress { current, total, status: None }events as bytes are streamed to the server.totalequals the sum of all file sizes in bytes;currenttracks aggregate bytes sent across all files using a shared atomic counter.
§Returns
Ok(()) on success.
§Errors
Returns Error::PermissionDenied if the server rejects the request, or
Error::RpcError for other server-side failures.
Sourcepub async fn download_data(
&self,
client: &Client,
filename: &str,
output_path: &Path,
progress: Option<Sender<Progress>>,
) -> Result<(), Error>
pub async fn download_data( &self, client: &Client, filename: &str, output_path: &Path, progress: Option<Sender<Progress>>, ) -> Result<(), Error>
Streams a file from this validation session’s data folder to output_path.
§Arguments
client- The authenticated client instance.filename- Name of the file to download (relative to the session data root).output_path- Local path to write the downloaded file.progress- Optional progress channel; events carry bytes received andContent-Lengthtotal (0 if server omits it).
§Returns
Ok(()) when the file has been written and flushed.
§Errors
Returns Error::PermissionDenied if authorization fails,
Error::RpcError if the server returns a JSON-RPC error envelope
(decoded from the Content-Type: application/json body), or
Error::IoError on file write failures. Legitimate JSON file
payloads (e.g. trace JSON) are persisted normally rather than
treated as an error.
Sourcepub async fn data_list(&self, client: &Client) -> Result<Vec<String>, Error>
pub async fn data_list(&self, client: &Client) -> Result<Vec<String>, Error>
Lists files attached to this validation session’s data folder.
The server returns a flat list of relative file paths
(slash-separated, e.g. "folder/file.txt"), sorted lexicographically.
§Arguments
client- The authenticated client instance.
§Returns
A flat Vec<String> of relative file paths within the session data folder.
§Errors
Returns Error::PermissionDenied if authorization fails, or
Error::RpcError for other server-side failures.
Trait Implementations§
Source§impl Clone for ValidationSession
impl Clone for ValidationSession
Source§fn clone(&self) -> ValidationSession
fn clone(&self) -> ValidationSession
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 ValidationSession
impl Debug for ValidationSession
Source§impl<'de> Deserialize<'de> for ValidationSession
impl<'de> Deserialize<'de> for ValidationSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ValidationSession
impl RefUnwindSafe for ValidationSession
impl Send for ValidationSession
impl Sync for ValidationSession
impl Unpin for ValidationSession
impl UnsafeUnpin for ValidationSession
impl UnwindSafe for ValidationSession
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more