Skip to content

expdatalocalstorageloader

expdatalocalstorageloader

Module which contains factory methods for creating experiment data objects

Classes

Functions

create_expdata_from_expcontext

create_expdata_from_expcontext(exp_context)

Creates and loads an experiment data with the given experiment context

Source code in niceml/experiments/expdatalocalstorageloader.py
def create_expdata_from_expcontext(exp_context: ExperimentContext) -> ExperimentData:
    """Creates and loads an experiment data with the given experiment context"""
    storage = FSSpecStorage(exp_context.fs_config)
    return create_expdata_from_local_storage(storage=storage, exp_path="")

create_expdata_from_local_storage

create_expdata_from_local_storage(exp_path, storage=None)

Creates and loads an experiment data with the given path

Source code in niceml/experiments/expdatalocalstorageloader.py
def create_expdata_from_local_storage(
    exp_path: str,
    storage: Optional[StorageInterface] = None,
) -> ExperimentData:
    """Creates and loads an experiment data with the given path"""
    if storage is None:
        storage = LocalStorage()
    df_loader = SimpleDfLoader(storage, working_dir=exp_path)
    image_loader = SimpleImageLoader(storage, working_dir=exp_path)
    return create_expdata_from_storage(
        exp_path, storage, image_loader=image_loader, df_loader=df_loader
    )