modeller_schemas
Config YAML specification classes related to modeller/task configuration.
Classes
DataStructureAssignConfig
class DataStructureAssignConfig( target: Optional[Union[str, list[str]]] = None, image_cols: Optional[list[str]] = None, image_prefix: Optional[str] = None,):
Configuration for the datastructure assign argument.
Variables
- static
image_cols : Optional[list[str]]
- static
image_prefix : Optional[str]
- static
target : Union[str, list[str], ForwardRef(None)]
DataStructureConfig
class DataStructureConfig( table_config: Optional[DataStructureTableConfig] = None, assign: DataStructureAssignConfig = DataStructureAssignConfig(target=None, image_cols=None, image_prefix=None), select: DataStructureSelectConfig = DataStructureSelectConfig(include=None, include_prefix=None, exclude=None), transform: DataStructureTransformConfig = DataStructureTransformConfig(dataset=None, batch=None, image=None, auto_convert_grayscale_images=True), data_split: Optional[DataSplitConfig] = None, schema_requirements: SCHEMA_REQUIREMENTS_TYPES = 'partial', compatible_datasources: list[str] = ['CSVSource', 'DICOMSource', 'DICOMOphthalmologySource', 'HeidelbergSource'],):
Configuration for the modeller schema and dataset options.
Variables
- static
assign : DataStructureAssignConfig
- static
compatible_datasources : list[str]
- static
data_split : Optional[DataSplitConfig]
- static
schema_requirements : Union[Literal['empty', 'partial', 'full'], Dict[Literal['empty', 'partial', 'full'], Any]]
- static
select : DataStructureSelectConfig
- static
table_config : Optional[DataStructureTableConfig]
- static
transform : DataStructureTransformConfig
DataStructureSelectConfig
class DataStructureSelectConfig( include: Optional[list[str]] = None, include_prefix: Optional[str] = None, exclude: Optional[list[str]] = None,):
Configuration for the datastructure select argument.
Variables
- static
exclude : Optional[list[str]]
- static
include : Optional[list[str]]
- static
include_prefix : Optional[str]
DataStructureTableConfig
class DataStructureTableConfig( table: Union[str, dict[str, str]], schema_types_override: Optional[Union[SchemaOverrideMapping, Mapping[str, SchemaOverrideMapping]]] = None,):
Configuration for the datastructure table arguments. Deprecated.
Variables
- static
schema_types_override : Union[collections.abc.Mapping[Literal['categorical', 'continuous', 'image', 'text'], list[Union[str, collections.abc.Mapping[str, collections.abc.Mapping[str, int]]]]], Mapping[str, collections.abc.Mapping[Literal['categorical', 'continuous', 'image', 'text'], list[Union[str, collections.abc.Mapping[str, collections.abc.Mapping[str, int]]]]]], ForwardRef(None)]
- static
table : Union[str, dict[str, str]]
DataStructureTransformConfig
class DataStructureTransformConfig( dataset: Optional[list[dict[str, _JSONDict]]] = None, batch: Optional[list[dict[str, _JSONDict]]] = None, image: Optional[list[dict[str, _JSONDict]]] = None, auto_convert_grayscale_images: bool = True,):
Configuration for the datastructure transform argument.
Variables
- static
auto_convert_grayscale_images : bool
- static
batch : Optional[list[dict[str, dict[str, typing.Any]]]]
- static
dataset : Optional[list[dict[str, dict[str, typing.Any]]]]
- static
image : Optional[list[dict[str, dict[str, typing.Any]]]]
ModellerConfig
class ModellerConfig( pods: PodsConfig, task: TaskConfig, secrets: Optional[Union[APIKeys, JWT]] = None, modeller: ModellerUserConfig = ModellerUserConfig(username='_default', identity_verification_method='oidc-device-code', private_key_file=None), hub: HubConfig = HubConfig(url='https://hub.bitfount.com'), message_service: MessageServiceConfig = MessageServiceConfig(url='messaging.staging.bitfount.com', port=443, tls=True, use_local_storage=False), version: Optional[str] = None, project_id: Optional[str] = None, run_on_new_data_only: bool = False, batched_execution: Optional[bool] = None,):
Full configuration for the modeller.
Subclasses
Variables
- static
batched_execution : Optional[bool]
- static
hub : HubConfig
- static
message_service : MessageServiceConfig
- static
modeller : ModellerUserConfig
- static
pods : PodsConfig
- static
project_id : Optional[str]
- static
run_on_new_data_only : bool
- static
task : TaskConfig
- static
version : Optional[str]
ModellerUserConfig
class ModellerUserConfig( username: str = '_default', identity_verification_method: str = 'oidc-device-code', private_key_file: Optional[Path] = None,):
Configuration for the modeller.
Arguments
username
: The username of the modeller. This can be picked up automatically from the session but can be overridden here.identity_verification_method
: The method to use for identity verification. Accepts one of the values inIDENTITY_VERIFICATION_METHODS
, i.e. one ofkey-based
,oidc-auth-code
oroidc-device-code
.private_key_file
: The path to the private key file for key-based identity verification.
Variables
- static
identity_verification_method : str
- static
private_key_file : Optional[pathlib.Path]
- static
username : str
PodsConfig
class PodsConfig(identifiers: list[str]):
Configuration for the pods to use for the modeller.
Variables
- static
identifiers : list[str]
TaskConfig
class TaskConfig( protocol: Union[ProtocolConfig._get_subclasses()], algorithm: Union[Union[AlgorithmConfig._get_subclasses()], list[Union[AlgorithmConfig._get_subclasses()]]], data_structure: DataStructureConfig, aggregator: Optional[AggregatorConfig] = None, transformation_file: Optional[Path] = None,):
Configuration for the task.
Variables
- static
aggregator : Optional[AggregatorConfig]
- static
algorithm : Union[TrialInclusionCriteriaMatchAlgorithmBronzeConfig, TrialInclusionCriteriaMatchAlgorithmAmethystConfig, TrialInclusionCriteriaMatchAlgorithmJadeConfig, GATrialPDFGeneratorAlgorithmAmethystConfig, GATrialPDFGeneratorAlgorithmJadeConfig, GATrialCalculationAlgorithmBronzeConfig, GATrialCalculationAlgorithmJadeConfig, bitfount.runners.config_schemas.algorithm_schemas._SimpleCSVAlgorithmAlgorithmConfig, FoveaCoordinatesAlgorithmConfig, ETDRSAlgorithmConfig, CSVReportGeneratorOphthalmologyAlgorithmConfig, NextGenPatientQueryAlgorithmConfig, TIMMInferenceAlgorithmConfig, TIMMFineTuningAlgorithmConfig, HuggingFaceTextClassificationInferenceAlgorithmConfig, HuggingFaceImageSegmentationInferenceAlgorithmConfig, HuggingFaceImageClassificationInferenceAlgorithmConfig, CSVReportAlgorithmConfig, HuggingFaceTextGenerationInferenceAlgorithmConfig, HuggingFacePerplexityEvaluationAlgorithmConfig, PrivateSqlQueryAlgorithmConfig, SqlQueryAlgorithmConfig, ModelInferenceAlgorithmConfig, ModelEvaluationAlgorithmConfig, ModelTrainingAndEvaluationAlgorithmConfig, FederatedModelTrainingAlgorithmConfig, GenericAlgorithmConfig, list[Union[TrialInclusionCriteriaMatchAlgorithmBronzeConfig, TrialInclusionCriteriaMatchAlgorithmAmethystConfig, TrialInclusionCriteriaMatchAlgorithmJadeConfig, GATrialPDFGeneratorAlgorithmAmethystConfig, GATrialPDFGeneratorAlgorithmJadeConfig, GATrialCalculationAlgorithmBronzeConfig, GATrialCalculationAlgorithmJadeConfig, bitfount.runners.config_schemas.algorithm_schemas._SimpleCSVAlgorithmAlgorithmConfig, FoveaCoordinatesAlgorithmConfig, ETDRSAlgorithmConfig, CSVReportGeneratorOphthalmologyAlgorithmConfig, NextGenPatientQueryAlgorithmConfig, TIMMInferenceAlgorithmConfig, TIMMFineTuningAlgorithmConfig, HuggingFaceTextClassificationInferenceAlgorithmConfig, HuggingFaceImageSegmentationInferenceAlgorithmConfig, HuggingFaceImageClassificationInferenceAlgorithmConfig, CSVReportAlgorithmConfig, HuggingFaceTextGenerationInferenceAlgorithmConfig, HuggingFacePerplexityEvaluationAlgorithmConfig, PrivateSqlQueryAlgorithmConfig, SqlQueryAlgorithmConfig, ModelInferenceAlgorithmConfig, ModelEvaluationAlgorithmConfig, ModelTrainingAndEvaluationAlgorithmConfig, FederatedModelTrainingAlgorithmConfig, GenericAlgorithmConfig]]]
- static
data_structure : DataStructureConfig
- static
protocol : Union[NextGenSearchProtocolConfig, GAScreeningProtocolBronzeConfig, GAScreeningProtocolAmethystConfig, GAScreeningProtocolJadeConfig, RetinalDiseaseProtocolCobaltConfig, InferenceAndReturnCSVReportConfig, InstrumentedInferenceAndCSVReportConfig, InferenceAndCSVReportConfig, FederatedAveragingProtocolConfig, ResultsOnlyProtocolConfig, GenericProtocolConfig]
- static
transformation_file : Optional[pathlib.Path]
TemplatedModellerConfig
class TemplatedModellerConfig( pods: PodsConfig, task: TaskConfig, secrets: Optional[Union[APIKeys, JWT]] = None, modeller: ModellerUserConfig = ModellerUserConfig(username='_default', identity_verification_method='oidc-device-code', private_key_file=None), hub: HubConfig = HubConfig(url='https://hub.bitfount.com'), message_service: MessageServiceConfig = MessageServiceConfig(url='messaging.staging.bitfount.com', port=443, tls=True, use_local_storage=False), version: Optional[str] = None, project_id: Optional[str] = None, run_on_new_data_only: bool = False, batched_execution: Optional[bool] = None, template: Optional[dict[str, TemplateVariablesEntryString | TemplateVariablesEntryNumber | TemplateVariablesEntryArray | TemplateVariablesEntryFilePath | TemplateVariablesEntryModelSlug | TemplateVariablesEntrySchemaColumnName | TemplateVariablesEntrySchemaColumnNameArray]] = None,):
Schema for task templates.