module documentation
Undocumented
| Function | find |
Find the group ID assigned to an original file path. |
| Function | find |
Find the UUID assigned to an original file path. |
| Function | get |
Undocumented |
| Function | get |
Undocumented |
@overload
def find_filepath_group_id(filepath:
PathType, index: pl.DataFrame | None, *, raise_on_missing: Literal[ False] = ...) -> str | None:@overload
def find_filepath_group_id(filepath:
PathType, index: pl.DataFrame | None, *, raise_on_missing: Literal[ True] = ...) -> str:Find the group ID assigned to an original file path.
Examples
>>> import polars as pl >>> path = Path("image.jpg").absolute().resolve() >>> index = pl.DataFrame({ ... "original_filepath": [str(path)], ... "group_id": ["group-1"], ... }) >>> find_filepath_group_id(path, index) 'group-1' >>> find_filepath_group_id(None, None) is None True
| Parameters | |
filepath:PathType | Original file path to look up. |
index:pl.DataFrame | None | Optional dataframe containing original_filepath and group_id columns. |
raisebool | Whether to raise when the path is not in the index. |
| Returns | |
str | None | Matching group ID, or None when index is None or the path is missing and raise_on_missing is False. |
| Raises | |
ValueError | If raise_on_missing is True and the path is not in the index. |
@overload
def find_filepath_uuid(filepath:
PathType, index: pl.DataFrame | None, *, raise_on_missing: Literal[ False] = ...) -> str | None:@overload
def find_filepath_uuid(filepath:
PathType, index: pl.DataFrame | None, *, raise_on_missing: Literal[ True] = ...) -> str:Find the UUID assigned to an original file path.
Examples
>>> import polars as pl >>> path = Path("image.jpg").absolute().resolve() >>> index = pl.DataFrame({ ... "original_filepath": [str(path)], ... "uuid": ["abc"], ... }) >>> find_filepath_uuid(path, index) 'abc' >>> find_filepath_uuid("missing.jpg", index, raise_on_missing=True) Traceback (most recent call last): ... ValueError: File ...missing.jpg not found in index
| Parameters | |
filepath:PathType | Original file path to look up. |
index:pl.DataFrame | None | Optional dataframe containing original_filepath and uuid columns. |
raisebool | Whether to raise when the path is not in the index. |
| Returns | |
str | None | Matching UUID, or None when index is None or the path is missing and raise_on_missing is False. |
| Raises | |
ValueError | If raise_on_missing is True and the path is not in the index. |
@overload
def get_dir(fs:
LuxonisFileSystem, remote_path: PosixPathType, local_dir: PathType, mlflow_instance: ModuleType | None = ..., *, default: None = None) -> Path | None:@overload
def get_dir(fs:
LuxonisFileSystem, remote_path: PosixPathType, local_dir: PathType, mlflow_instance: ModuleType | None = ..., *, default: Path = ...) -> Path:Undocumented
@overload
def get_file(fs:
LuxonisFileSystem, remote_path: PosixPathType, local_path: PathType, mlflow_instance: ModuleType | None = ..., default: None = ...) -> Path | None:@overload
def get_file(fs:
LuxonisFileSystem, remote_path: PosixPathType, local_path: PathType, mlflow_instance: ModuleType | None = ..., default: PathType = ...) -> Path:Undocumented