Skip to main content

types

Useful types for Federated Learning.

Classes

AccessCheckResult

class AccessCheckResult(*args, **kwargs):

Container for the result of the access manager check.

Ancestors

  • builtins.dict

Variables

  • static limits : Optional[list[bitfount.types._ResourceUsageAndLimitJSON]]
  • static response_type : bitfount.federated.types._PodResponseType

AggregatorType

class AggregatorType(    value, names=None, *, module=None, qualname=None, type=None, start=1,):

Available aggregator names from bitfount.federated.aggregator.

Ancestors

Variables

  • static Aggregator
  • static SecureAggregator

AlgorithmType

class AlgorithmType(value, names=None, *, module=None, qualname=None, type=None, start=1):

Available algorithm names from bitfount.federated.algorithm.

Ancestors

Variables

  • static CSVReportAlgorithm
  • static CSVReportGeneratorAlgorithm
  • static CSVReportGeneratorOphthalmologyAlgorithm
  • static ETDRSAlgorithm
  • static FederatedModelTraining
  • static FoveaCoordinatesAlgorithm
  • static GATrialCalculationAlgorithm
  • static GATrialCalculationAlgorithmBronze
  • static GATrialCalculationAlgorithmJade
  • static GATrialPDFGeneratorAlgorithm
  • static GATrialPDFGeneratorAlgorithmAmethyst
  • static GATrialPDFGeneratorAlgorithmJade
  • static HuggingFaceImageClassificationInference
  • static HuggingFaceImageSegmentationInference
  • static HuggingFacePerplexityEvaluation
  • static HuggingFaceTextClassificationInference
  • static HuggingFaceTextGenerationInference
  • static ModelEvaluation
  • static ModelInference
  • static ModelTrainingAndEvaluation
  • static PrivateSqlQuery
  • static SqlQuery
  • static TIMMFineTuning
  • static TIMMInference
  • static TrialInclusionCriteriaMatchAlgorithm
  • static TrialInclusionCriteriaMatchAlgorithmAmethyst
  • static TrialInclusionCriteriaMatchAlgorithmBronze
  • static TrialInclusionCriteriaMatchAlgorithmJade

DatasourceContainer

class DatasourceContainer(    name: str,    datasource: BaseSource,    datasource_details: PodDetailsConfig,    data_config: PodDataConfig,    schema: BitfountSchema,):

Contains a datasource and all the data related to it.

This represents a datasource configuration post-data-loading/configuration and so the data config and schema must be present.

Variables

  • static data_config : PodDataConfig
  • static datasource : BaseSource
  • static datasource_details : PodDetailsConfig
  • static name : str
  • static schema : BitfountSchema

DatasourceContainerConfig

class DatasourceContainerConfig(    name: str,    datasource: BaseSource,    datasource_details: Optional[PodDetailsConfig] = None,    data_config: Optional[PodDataConfig] = None,    schema: Optional[Union[str, os.PathLike, BitfountSchema]] = None,):

Contains a datasource and maybe some data related to it.

This represents a datasource configuration pre-data-loading/configuration and so the data config and schema are not required.

Variables

  • static data_config : Optional[PodDataConfig]
  • static datasource : BaseSource
  • static datasource_details : Optional[PodDetailsConfig]
  • static name : str
  • static schema : Optional[Union[str, os.PathLike, BitfountSchema]]

HubConfig

class HubConfig(    username: Optional[str],    secrets: Optional[Union[APIKeys, JWT]],    session: Optional[BitfountSession] = None,):

Configuration for connecting to Bitfount Hub.

Variables

  • static secrets : Optional[Union[APIKeys, JWT]]
  • static session : Optional[BitfountSession]
  • static username : Optional[str]

HuggingFaceImageClassificationInferenceDictionary

class HuggingFaceImageClassificationInferenceDictionary(*args, **kwargs):

Hugging Face dictionary response for image classification.

Ancestors

  • builtins.dict

Variables

  • static image_classification : str

MinimalDatasourceConfig

class MinimalDatasourceConfig(    datasource_cls_name: str,    name: str,    datasource_args: _JSONDict,    file_system_filters: Optional[FileSystemFilterConfig],):

Minimal serializable configuration required for creating a datasource.

Variables

  • static datasource_args : _JSONDict
  • static datasource_cls_name : str
  • static file_system_filters : Optional[FileSystemFilterConfig]
  • static name : str

MinimalSchemaGenerationConfig

class MinimalSchemaGenerationConfig(    datasource_name: str,    description: Optional[str],    column_descriptions: Optional[Union[Mapping[str, Mapping[str, str]], Mapping[str, str]]],    ignore_cols: Optional[list[str]],    force_stypes: "Optional[MutableMapping[Literal['categorical', 'continuous', 'image', 'text', 'image_prefix'], list[str]]]",):

Minimal serializable configuration required for creating a schema.

Variables

  • static column_descriptions : Union[Mapping[str, Mapping[str, str]], Mapping[str, str], ForwardRef(None)]
  • static datasource_name : str
  • static description : Optional[str]
  • static force_stypes : Optional[MutableMapping[Literal['categorical', 'continuous', 'image', 'text', 'image_prefix'], list[str]]]
  • static ignore_cols : Optional[list[str]]

MinimalSchemaUploadConfig

class MinimalSchemaUploadConfig(    public_metadata: PodPublicMetadata,    access_manager_public_key: RSAPublicKey,    pod_public_key: RSAPublicKey,):

Minimal serializable configuration required for uploading a schema.

Variables

  • static access_manager_public_key : RSAPublicKey
  • static pod_public_key : RSAPublicKey
  • static public_metadata : PodPublicMetadata

ProtocolType

class ProtocolType(value, names=None, *, module=None, qualname=None, type=None, start=1):

Available protocol names from bitfount.federated.protocol.

Ancestors

Variables

  • static BasicOCTProtocol
  • static FederatedAveraging
  • static GAScreeningProtocol
  • static GAScreeningProtocolAmethyst
  • static GAScreeningProtocolBronze
  • static GAScreeningProtocolJade
  • static InferenceAndCSVReport
  • static InferenceAndReturnCSVReport
  • static InstrumentedInferenceAndCSVReport
  • static ResultsOnly
  • static RetinalDiseaseProtocolCobalt

SerializedAggregator

class SerializedAggregator(*args, **kwargs):

Serialized representation of an aggregator.

Ancestors

  • builtins.dict

Variables

  • static class_name : str

SerializedAlgorithm

class SerializedAlgorithm(*args, **kwargs):

Serialized representation of an algorithm.

Ancestors

  • builtins.dict

Variables

  • static class_name : str

SerializedDataStructure

class SerializedDataStructure(*args, **kwargs):

Serialized representation of a data structure.

Ancestors

  • builtins.dict

Variables

  • static compatible_datasources : typing_extensions.NotRequired[list[str]]
  • static schema_requirements : typing_extensions.NotRequired[dict[str, typing.Any]]
  • static table : typing_extensions.NotRequired[typing.Union[str, dict[str, str]]]

SerializedModel

class SerializedModel(*args, **kwargs):

Serialized representation of a model.

Ancestors

  • builtins.dict

Variables

  • static class_name : str
  • static hub : NotRequired[Optional[BitfountHub]]
  • static schema : NotRequired[_StrAnyDict]

SerializedProtocol

class SerializedProtocol(*args, **kwargs):

Serialized representation of a protocol.

Ancestors

  • builtins.dict

Variables

  • static class_name : str

TextGenerationDictionary

class TextGenerationDictionary(*args, **kwargs):

Hugging Face dictionary response for text generation.

Ancestors

  • builtins.dict

Variables

  • static generated_text : str