Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT._pythonization._ml_dataloader Namespace Reference

Classes

class  _RDataLoader
 
class  _TrainingEpochContext
 
class  _ValidationEpochContext
 
class  FormattedLoader
 Iterable that converts each batch to the requested format. More...
 
class  RDataLoader
 Entry point for ML batch loading from a ROOT RDataFrame. More...
 

Functions

list[str] _exclude_target_and_weights (list[str] columns, list[str] target_columns, str weights_column)
 Drop any target/weights column names that also appear in columns.
 
 _inject_dataloader_api (parentmodule)
 Inject the public Python API into the ROOT.Experimental.ML namespace.
 
bool _is_spec (Any item)
 Whether item is a (dataset_name, files) tuple.
 
list[str] _normalize_target (str|list[str]|None target)
 target can be a string, list of strings, or None.
 
list _open_files (Any inputs)
 Return the inputs as a list of RDataFrames, each (dataset_name, files) tuple being read into one RDataFrame.
 
None _raise_if_implicit_mt (list rdfs)
 Raise if ImplicitMT is enabled, or was when one of the RDataFrames was created.
 

Variables

 __name__
 
 Spec = Tuple[str, str | os.PathLike | Iterable[str | os.PathLike]]
 

Function Documentation

◆ _exclude_target_and_weights()

list[str] ROOT._pythonization._ml_dataloader._exclude_target_and_weights ( list[str] columns,
list[str] target_columns,
str weights_column )
protected

Drop any target/weights column names that also appear in columns.

Definition at line 45 of file _ml_dataloader.py.

◆ _inject_dataloader_api()

ROOT._pythonization._ml_dataloader._inject_dataloader_api ( parentmodule)
protected

Inject the public Python API into the ROOT.Experimental.ML namespace.

Only RDataLoader is part of the public surface.

Definition at line 936 of file _ml_dataloader.py.

◆ _is_spec()

bool ROOT._pythonization._ml_dataloader._is_spec ( Any item)
protected

Whether item is a (dataset_name, files) tuple.

Definition at line 61 of file _ml_dataloader.py.

◆ _normalize_target()

list[str] ROOT._pythonization._ml_dataloader._normalize_target ( str | list[str] | None target)
protected

target can be a string, list of strings, or None.

Normalize to a list of strings to be consistent with columns.

Definition at line 35 of file _ml_dataloader.py.

◆ _open_files()

list ROOT._pythonization._ml_dataloader._open_files ( Any inputs)
protected

Return the inputs as a list of RDataFrames, each (dataset_name, files) tuple being read into one RDataFrame.

Definition at line 66 of file _ml_dataloader.py.

◆ _raise_if_implicit_mt()

None ROOT._pythonization._ml_dataloader._raise_if_implicit_mt ( list rdfs)
protected

Raise if ImplicitMT is enabled, or was when one of the RDataFrames was created.

Definition at line 51 of file _ml_dataloader.py.

Variable Documentation

◆ __name__

ROOT._pythonization._ml_dataloader.__name__
private

Definition at line 942 of file _ml_dataloader.py.

◆ Spec

ROOT._pythonization._ml_dataloader.Spec = Tuple[str, str | os.PathLike | Iterable[str | os.PathLike]]

Definition at line 32 of file _ml_dataloader.py.