config_schemas
Dataclasses to hold the configuration details for the runners.
Classes
AccessManagerConfig
class AccessManagerConfig(url: str = 'https://am.bitfount.com'):
Configuration for the access manager.
Variables
- static
url : str
AggregatorConfig
class AggregatorConfig( secure: bool, weights: Optional[Dict[str, Union[int, float]]] = None,):
Configuration for the Aggregator.
AlgorithmConfig
class AlgorithmConfig( name: str, arguments: _JSONDict = <factory>, pretrained_file: Optional[Path] = None,):
Configuration for the Algorithm.
Variables
- static
arguments : Dict[str, Any]
- static
name : str
- static
pretrained_file : Optional[pathlib.Path]
BitfountModelReferenceConfig
class BitfountModelReferenceConfig( model_ref: Union[Path, str], model_version: Optional[int] = None, username: Optional[str] = None,):
Configuration for BitfountModelReference.
Variables
- static
model_ref : Union[pathlib.Path, str]
- static
model_version : Optional[int]
- static
username : Optional[str]
DataSplitConfig
class DataSplitConfig(data_splitter: str = 'percentage', args: _JSONDict = <factory>):
Configuration for the data splitter.
DataStructureAssignConfig
class DataStructureAssignConfig( target: Union[str, List[str]], image_cols: Optional[List[str]] = None, loss_weights_col: Optional[str] = None, multihead_col: Optional[str] = None, ignore_classes_col: Optional[str] = None,):
Configuration for the datastructure assign argument.
Variables
- static
ignore_classes_col : Optional[str]
- static
image_cols : Optional[List[str]]
- static
loss_weights_col : Optional[str]
- static
multihead_col : Optional[str]
- static
target : Union[str, List[str]]
DataStructureConfig
class DataStructureConfig( table_config: DataStructureTableConfig, assign: DataStructureAssignConfig, select: DataStructureSelectConfig = <factory>, transform: DataStructureTransformConfig = <factory>,):
Configuration for the modeller schema and dataset options.
Variables
- static
assign : DataStructureAssignConfig
- static
select : DataStructureSelectConfig
- static
table_config : DataStructureTableConfig
- static
transform : DataStructureTransformConfig
DataStructureSelectConfig
class DataStructureSelectConfig( include: List[str] = <factory>, exclude: List[str] = <factory>,):
Configuration for the datastructure select argument.
DataStructureTableConfig
class DataStructureTableConfig( table: Optional[Union[str, Dict[str, str]]] = None, query: Optional[Union[str, Dict[str, str]]] = None, schema_types_override: Optional[Union[SchemaOverrideMapping, Mapping[str, SchemaOverrideMapping]]] = None,):
Configuration for the datastructure table arguments.
Variables
- static
query : Union[str, Dict[str, str], None]
- static
schema_types_override : Union[Mapping[Literal['categorical', 'continuous', 'image', 'text'], List[Union[str, Mapping[str, Mapping[str, int]]]]], Mapping[str, Mapping[Literal['categorical', 'continuous', 'image', 'text'], List[Union[str, Mapping[str, Mapping[str, int]]]]]], None]
- static
table : Union[str, Dict[str, str], None]
DataStructureTransformConfig
class DataStructureTransformConfig( dataset: Optional[List[Dict[str, _JSONDict]]] = None, batch: Optional[List[Dict[str, _JSONDict]]] = None,):
Configuration for the datastructure transform argument.
Variables
- static
batch : Optional[List[Dict[str, Dict[str, Any]]]]
- static
dataset : Optional[List[Dict[str, Dict[str, Any]]]]
DatabaseConfig
class DatabaseConfig( con: str, db_schema: Optional[str] = None, query: Optional[str] = None, table_names: Optional[List[str]] = None,):
Configuration for the DatabaseConnection.
Methods
def get_db_connection(self) ‑> DatabaseConnection:
Returns a DatabaseConnection.
Variables
- static
con : str
- static
db_schema : Optional[str]
- static
query : Optional[str]
- static
table_names : Optional[List[str]]
HubConfig
class HubConfig(url: str = 'https://hub.bitfount.com'):
Configuration for the hub.
Variables
- static
url : str
ModelConfig
class ModelConfig( name: Optional[str] = None, structure: Optional[ModelStructureConfig] = None, bitfount_model: Optional[BitfountModelReferenceConfig] = None, hyperparameters: _JSONDict = <factory>, logger_config: Optional[LoggerConfig] = None, dp_config: Optional[DPModellerConfig] = None,):
Configuration for the model.
Variables
- static
bitfount_model : Optional[BitfountModelReferenceConfig]
- static
dp_config : Optional[DPModellerConfig]
- static
hyperparameters : Dict[str, Any]
- static
logger_config : Optional[LoggerConfig]
- static
name : Optional[str]
- static
structure : Optional[ModelStructureConfig]
ModelStructureConfig
class ModelStructureConfig(name: str, arguments: _JSONDict = <factory>):
Configuration for the ModelStructure.
ModellerConfig
class ModellerConfig( pods: PodsConfig, data_structure: DataStructureConfig, task: TaskConfig, modeller: ModellerUserConfig = <factory>, hub: HubConfig = <factory>, message_service: MessageServiceConfig = <factory>,):
Full configuration for the modeller.
Variables
- static
data_structure : DataStructureConfig
- static
hub : HubConfig
- static
message_service : MessageServiceConfig
- static
modeller : ModellerUserConfig
- static
pods : PodsConfig
- static
task : TaskConfig
ModellerUserConfig
class ModellerUserConfig( username: str = '_default', identity_verification_method: str = 'oidc-device-code', private_key_file: Optional[Path] = None, identity_provider_url: Optional[str] = None,):
Configuration for the modeller.
Variables
- static
identity_provider_url : Optional[str]
- static
identity_verification_method : str
- static
private_key_file : Optional[pathlib.Path]
- static
username : str
PathConfig
class PathConfig(path: Path):
Configuration for the path.
Variables
- static
path : pathlib.Path
PodConfig
class PodConfig( datasource: str, data_config: PodDataConfig, api_key: Optional[APIKeys] = None, pod_name: str = <fields.String(dump_default=<marshmallow.missing>, attribute=None, validate=<Regexp(regex=re.compile('[a-z\\d]+((-|_)[a-z\\d]+)*'), error='String does not match expected pattern.')>, required=False, load_only=False, dump_only=False, load_default=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>, pod_details: Optional[PodDetailsConfig] = None, schema: Optional[Path] = None, access_manager: AccessManagerConfig = <factory>, hub: HubConfig = <factory>, message_service: MessageServiceConfig = <factory>, differential_privacy: Optional[DPPodConfig] = None, other_pods: Optional[List[str]] = None, username: str = '_default',):
Full configuration for the pod.
Raises
ValueError
: If a username is not provided alongside API keys.
Variables
- static
access_manager : AccessManagerConfig
- static
api_key : Optional[APIKeys]
- static
data_config : PodDataConfig
- static
datasource : str
- static
differential_privacy : Optional[DPPodConfig]
- static
hub : HubConfig
- static
message_service : MessageServiceConfig
- static
other_pods : Optional[List[str]]
- static
pod_details : Optional[PodDetailsConfig]
- static
pod_name : str
- static
schema : Optional[pathlib.Path]
- static
username : str
pod_id : str
- The pod ID of the pod specified.
PodDataConfig
class PodDataConfig( force_stypes: Optional[Mapping[str, MutableMapping[_SemanticTypeValue, List[str]]]] = None, ignore_cols: Optional[List[str]] = None, modifiers: Optional[Dict[str, DataPathModifiers]] = None, datasource_args: _JSONDict = <factory>, data_split: DataSplitConfig = <factory>, auto_tidy: bool = False,):
Configuration for the Schema, BaseSource and Pod.
Arguments
force_stypes
: The semantic types to force for the data. This is passed to theBitfountSchema
.ignore_cols
: The columns to ignore. This is passed to the data source.modifiers
: The modifiers to apply to the data. This is passed to theBaseSource
.datasource_args
: Key-value pairs of arguments to pass to the data source constructor.data_split
: The data split configuration. This is passed to the data source.auto_tidy
: Whether to automatically tidy the data. This is used by thePod
and will result in removal of NaNs and normalisation of numeric values. Defaults to False.
Variables
- static
auto_tidy : bool
- static
data_split : DataSplitConfig
- static
datasource_args : Dict[str, Any]
- static
force_stypes : Optional[Mapping[str, MutableMapping[Literal['categorical', 'continuous', 'image', 'text'], List[str]]]]
- static
ignore_cols : Optional[List[str]]
- static
modifiers : Optional[Dict[str, DataPathModifiers]]
PodDetailsConfig
class PodDetailsConfig(display_name: str, description: str):
Configuration for the pod details.
Arguments
display_name
: The display name of the pod.description
: The description of the pod.
PodsConfig
class PodsConfig(identifiers: List[str]):
Configuration for the pods to use for the modeller.
Variables
- static
identifiers : List[str]
ProtocolConfig
class ProtocolConfig(name: str, arguments: _JSONDict = <factory>):
Configuration for the Protocol.
TaskConfig
class TaskConfig( protocol: ProtocolConfig, algorithm: AlgorithmConfig, model: ModelConfig, aggregator: Optional[AggregatorConfig] = None, transformation_file: Optional[Path] = None,):
Configuration for the task.
Variables
- static
aggregator : Optional[AggregatorConfig]
- static
algorithm : AlgorithmConfig
- static
model : ModelConfig
- static
protocol : ProtocolConfig
- static
transformation_file : Optional[pathlib.Path]