Skip to main content
Version: Main branch

config

superduper.base.config

Source code

BaseConfig​

BaseConfig(self) -> None

A base class for configuration dataclasses.

This class allows for easy updating of configuration dataclasses with a dictionary of parameters.

Config​

Config(self,
envs: dataclasses.InitVar[typing.Optional[typing.Dict[str,
str]]] = None,
data_backend: str = 'mongodb://mongodb:27017/test_db',
lance_home: str = '.superduper/vector_indices',
artifact_store: Optional[str] = None,
metadata_store: Optional[str] = None,
vector_search_engine: str = 'local',
cluster_engine: str = 'local',
retries: superduper.base.config.Retry = <factory>,
downloads: superduper.base.config.Downloads = <factory>,
fold_probability: float = 0.05,
log_level: superduper.base.config.LogLevel = <LogLevel.INFO: 'INFO'>,
logging_type: superduper.base.config.LogType = <LogType.SYSTEM: 'SYSTEM'>,
log_colorize: bool = True,
force_apply: bool = False,
bytes_encoding: superduper.base.config.BytesEncoding = <BytesEncoding.BYTES: 'bytes'>,
auto_schema: bool = True,
json_native: bool = True,
output_prefix: str = '_outputs__',
vector_search_kwargs: Dict = <factory>,
rest: superduper.base.config.RestConfig = <factory>) -> None
ParameterDescription
envsThe envs datas
data_backendThe URI for the data backend
lance_homeThe home directory for the Lance vector indices, Default: .superduper/vector_indices
artifact_storeThe URI for the artifact store
metadata_storeThe URI for the metadata store
vector_search_engineThe engine to use for vector search
cluster_engineThe engine to use for operating a distributed cluster
retriesSettings for retrying failed operations
downloadsSettings for downloading files
fold_probabilityThe probability of validation fold
log_levelThe severity level of the logs
logging_typeThe type of logging to use
force_applyWhether to force apply the configuration
bytes_encodingThe encoding of bytes in the data backend
auto_schemaWhether to automatically create the schema. If True, the schema will be created if it does not exist.
json_nativeWhether the databackend supports json natively or not.
log_colorizeWhether to colorize the logs
output_prefixThe prefix for the output table and output field key
vector_search_kwargsThe keyword arguments to pass to the vector search
restSettings for rest server.

The data class containing all configurable superduper values.

Downloads​

Downloads(self,
folder: Optional[str] = None,
n_workers: int = 0,
headers: Dict = <factory>,
timeout: Optional[int] = None) -> None
ParameterDescription
folderThe folder to download files to
n_workersThe number of workers to use for downloading
headersThe headers to use for downloading
timeoutThe timeout for downloading

Describes the configuration for downloading files.

RestConfig​

RestConfig(self,
uri: str = 'localhost:8000',
config: Optional[str] = None) -> None
ParameterDescription
uriRest server uri.
configPath configuration file.

Configuratin for basic rest server.

Retry​

Retry(self,
stop_after_attempt: int = 2,
wait_max: float = 10.0,
wait_min: float = 4.0,
wait_multiplier: float = 1.0) -> None
ParameterDescription
stop_after_attemptThe number of attempts to make
wait_maxThe maximum time to wait between attempts
wait_minThe minimum time to wait between attempts
wait_multiplierThe multiplier for the wait time between attempts

Describes how to retry using the tenacity library.