set_ground_truth
code_loader.leap_binder.set_ground_truth
code_loader.leap_binder.set_ground_truth(
function=Callable[[int, PreprocessingResponse], np.ndarray]
name=str
)Args
Examples
Basic Usage
from code_loader import leap_binder
from code_loader.contract.datasetclasses import PreprocessResponse
...
def gt_encoder(idx: int, preprocessing: Union[PreprocessResponse, list]) -> np.ndarray:
return preprocessing.data.iloc[idx]['ground_truth'].astype('float32')
leap_binder.set_ground_truth(
function=gt_encoder,
gt_name='classes'
)Guides
Last updated
Was this helpful?

