Skip to main content
Version: 0.6

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://localhost:27017/test_db',
secrets_volume: str = '/session/secrets',
artifact_store: str = 'filesystem://./artifact_store',
metadata_store: Optional[str] = None,
cache: str = 'in-process',
vector_search_engine: str = 'local',
cluster_engine: str = 'local',
retries: superduper.base.config.Retry = <factory>,
downloads: superduper.base.config.Downloads = <factory>,
log_level: superduper.base.config.LogLevel = <LogLevel.INFO: 'INFO'>,
logging_type: superduper.base.config.LogType = <LogType.SYSTEM: 'SYSTEM'>,
log_colorize: bool = True,
bytes_encoding: str = 'bytes',
force_apply: bool = False,
datatype_presets: superduper.base.config.DataTypePresets = <factory>,
json_native: bool = True,
output_prefix: str = '_outputs__',
vector_search_kwargs: Dict = <factory>) -> None
ParameterDescription
envsThe envs datas
data_backendThe URI for the data backend
secrets_volumeThe secrets volume mount for secrets env vars.
artifact_storeThe URI for the artifact store
metadata_storeThe URI for the metadata store
cacheA URI for an in-memory cache
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
log_levelThe severity level of the logs
logging_typeThe type of logging to use
force_applyWhether to force apply the configuration
datatype_presetsPresets to be applied for default types of data
json_nativeWhether the databackend supports json natively or not.
log_colorizeWhether to colorize the logs
bytes_encoding(Deprecated)
output_prefixThe prefix for the output table and output field key
vector_search_kwargsThe keyword arguments to pass to the vector search

The data class containing all configurable superduper values.

DataTypePresets​

DataTypePresets(self,
vector: str | None = None) -> None
ParameterDescription
vectorBaseDataType to encode vectors.

Paths of default types of data.

Overrides DataBackend.datatype_presets.

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.

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.