pub struct DaskIntegration { /* private fields */ }Expand description
Dask compatibility integration
Implementations§
Source§impl DaskIntegration
impl DaskIntegration
Sourcepub fn new(config: DaskConfig) -> Self
pub fn new(config: DaskConfig) -> Self
Create a new Dask integration
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> TorshResult<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> TorshResult<Self>
Load configuration from JSON file
Sourcepub fn initialize(
&mut self,
rank: u32,
world_size: u32,
local_rank: u32,
local_size: u32,
) -> TorshResult<()>
pub fn initialize( &mut self, rank: u32, world_size: u32, local_rank: u32, local_size: u32, ) -> TorshResult<()>
Initialize Dask integration
Sourcepub fn config(&self) -> &DaskConfig
pub fn config(&self) -> &DaskConfig
Get the current configuration
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if Dask integration is initialized
Sourcepub fn world_size(&self) -> u32
pub fn world_size(&self) -> u32
Get world size
Sourcepub fn local_rank(&self) -> u32
pub fn local_rank(&self) -> u32
Get local rank
Sourcepub fn local_size(&self) -> u32
pub fn local_size(&self) -> u32
Get local size
Sourcepub fn is_client_active(&self) -> bool
pub fn is_client_active(&self) -> bool
Check if Dask client is active
Sourcepub fn submit_task(
&mut self,
task_name: &str,
task_size: usize,
) -> TorshResult<String>
pub fn submit_task( &mut self, task_name: &str, task_size: usize, ) -> TorshResult<String>
Submit task to Dask cluster
Sourcepub fn compute(&mut self, collection_name: &str) -> TorshResult<()>
pub fn compute(&mut self, collection_name: &str) -> TorshResult<()>
Compute Dask collection
Sourcepub fn scale_cluster(&mut self, target_workers: u32) -> TorshResult<()>
pub fn scale_cluster(&mut self, target_workers: u32) -> TorshResult<()>
Scale Dask cluster
Sourcepub fn handle_worker_failure(&mut self, worker_id: u32) -> TorshResult<()>
pub fn handle_worker_failure(&mut self, worker_id: u32) -> TorshResult<()>
Handle worker failure
Sourcepub fn shutdown(&mut self) -> TorshResult<()>
pub fn shutdown(&mut self) -> TorshResult<()>
Shutdown Dask integration
Sourcepub fn default_config() -> DaskConfig
pub fn default_config() -> DaskConfig
Create a default Dask configuration
Sourcepub fn config_with_ml() -> DaskConfig
pub fn config_with_ml() -> DaskConfig
Create a configuration for machine learning workloads
Sourcepub fn config_with_large_scale(
n_workers: u32,
memory_per_worker: &str,
) -> DaskConfig
pub fn config_with_large_scale( n_workers: u32, memory_per_worker: &str, ) -> DaskConfig
Create a configuration for large-scale distributed computing
Auto Trait Implementations§
impl Freeze for DaskIntegration
impl RefUnwindSafe for DaskIntegration
impl Send for DaskIntegration
impl Sync for DaskIntegration
impl Unpin for DaskIntegration
impl UnsafeUnpin for DaskIntegration
impl UnwindSafe for DaskIntegration
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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