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', 'ImageSource', 'InterMineSource', 'NIFTISource', 'DICOMOphthalmologySource', 'HeidelbergSource', 'TopconSource'], filter: Optional[list[TaskFilterConfig]] = None,):Configuration for the modeller schema and dataset options.
Variables
- static
assign : DataStructureAssignConfig
- static
compatible_datasources : list[str]
- static
data_split : Optional[DataSplitConfig]
- static
filter : Optional[list[TaskFilterConfig]]
- 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[APIKeys | ExternallyManagedJWT | dict[SecretsUse, APIKeys | ExternallyManagedJWT]] = 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.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, test_run: bool = False, force_rerun_failed_files: bool = True, enable_anonymized_tracker_upload: bool = False, requires_ehr_connection: bool = False,):Full configuration for the modeller.
Subclasses
Variables
- static
batched_execution : Optional[bool]
- static
enable_anonymized_tracker_upload : bool
- static
force_rerun_failed_files : bool
- static
hub : HubConfig
- static
message_service : MessageServiceConfig
- static
modeller : ModellerUserConfig
- static
pods : PodsConfig
- static
project_id : Optional[str]
- static
requires_ehr_connection : bool
- static
run_on_new_data_only : bool
- static
secrets : Union[APIKeys, ExternallyManagedJWT, dict[Literal['bitfount', 'ehr'], APIKeys | ExternallyManagedJWT], ForwardRef(None)]
- static
task : TaskConfig
- static
test_run : bool
- 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-codeoroidc-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, primary_results_path: Optional[str] = None,):Configuration for the task.
Arguments
protocol: The protocol configuration for the task.algorithm: The algorithm(s) to run for this task.data_structure: The data structure configuration.aggregator: Optional aggregator configuration.transformation_file: Optional path to a transformation file.primary_results_path: Optional path for primary results.
Variables
- static
aggregator : Optional[AggregatorConfig]
- static
algorithm : Union[LongitudinalAlgorithmConfig, GCCCalculationAlgorithmConfig, CSTCalculationAlgorithmConfig, ImageSelectionAlgorithmConfig, PatientIDExchangeAlgorithmConfig, S3UploadAlgorithmWithMRNTrackingConfig, S3UploadAlgorithmConfig, TrialInclusionCriteriaMatchAlgorithmSapphireConfig, TrialInclusionCriteriaMatchAlgorithmCharcoalConfig, TrialInclusionCriteriaMatchAlgorithmBronzeConfig, TrialInclusionCriteriaMatchAlgorithmAmethystConfig, TrialInclusionCriteriaMatchAlgorithmJadeConfig, GATrialPDFGeneratorAlgorithmAmethystConfig, GATrialPDFGeneratorAlgorithmJadeConfig, GATrialCalculationAlgorithmCharcoalConfig, GATrialCalculationAlgorithmBronzeConfig, GATrialCalculationAlgorithmAmethystConfig, GATrialCalculationAlgorithmJadeConfig, ReduceCSVAlgorithmCharcoalConfig, bitfount.runners.config_schemas.algorithm_schemas._SimpleCSVAlgorithmAlgorithmConfig, FoveaCoordinatesAlgorithmConfig, FluidVolumeCalculationAlgorithmConfig, ETDRSAlgorithmConfig, CSVReportGeneratorOphthalmologyAlgorithmConfig, BscanImageAndMaskGenerationAlgorithmConfig, RecordFilterAlgorithmConfig, EHRPatientInfoDownloadAlgorithmConfig, EHRPatientQueryAlgorithmConfig, HuggingFaceNERInferenceAlgorithmConfig, MONAIBundleInferenceAlgorithmConfig, TIMMInferenceAlgorithmConfig, TIMMFineTuningAlgorithmConfig, HuggingFaceTextClassificationInferenceAlgorithmConfig, HuggingFaceImageSegmentationInferenceAlgorithmConfig, HuggingFaceImageClassificationInferenceAlgorithmConfig, CSVReportAlgorithmConfig, HuggingFaceImageTextGenerationInferenceAlgorithmConfig, HuggingFaceTextGenerationInferenceAlgorithmConfig, HuggingFacePerplexityEvaluationAlgorithmConfig, PrivateSqlQueryAlgorithmConfig, SqlQueryAlgorithmConfig, ModelInferenceAlgorithmConfig, ModelEvaluationAlgorithmConfig, ModelTrainingAndEvaluationAlgorithmConfig, FederatedModelTrainingAlgorithmConfig, GenericAlgorithmConfig, list[Union[LongitudinalAlgorithmConfig, GCCCalculationAlgorithmConfig, CSTCalculationAlgorithmConfig, ImageSelectionAlgorithmConfig, PatientIDExchangeAlgorithmConfig, S3UploadAlgorithmWithMRNTrackingConfig, S3UploadAlgorithmConfig, TrialInclusionCriteriaMatchAlgorithmSapphireConfig, TrialInclusionCriteriaMatchAlgorithmCharcoalConfig, TrialInclusionCriteriaMatchAlgorithmBronzeConfig, TrialInclusionCriteriaMatchAlgorithmAmethystConfig, TrialInclusionCriteriaMatchAlgorithmJadeConfig, GATrialPDFGeneratorAlgorithmAmethystConfig, GATrialPDFGeneratorAlgorithmJadeConfig, GATrialCalculationAlgorithmCharcoalConfig, GATrialCalculationAlgorithmBronzeConfig, GATrialCalculationAlgorithmAmethystConfig, GATrialCalculationAlgorithmJadeConfig, ReduceCSVAlgorithmCharcoalConfig, bitfount.runners.config_schemas.algorithm_schemas._SimpleCSVAlgorithmAlgorithmConfig, FoveaCoordinatesAlgorithmConfig, FluidVolumeCalculationAlgorithmConfig, ETDRSAlgorithmConfig, CSVReportGeneratorOphthalmologyAlgorithmConfig, BscanImageAndMaskGenerationAlgorithmConfig, RecordFilterAlgorithmConfig, EHRPatientInfoDownloadAlgorithmConfig, EHRPatientQueryAlgorithmConfig, HuggingFaceNERInferenceAlgorithmConfig, MONAIBundleInferenceAlgorithmConfig, TIMMInferenceAlgorithmConfig, TIMMFineTuningAlgorithmConfig, HuggingFaceTextClassificationInferenceAlgorithmConfig, HuggingFaceImageSegmentationInferenceAlgorithmConfig, HuggingFaceImageClassificationInferenceAlgorithmConfig, CSVReportAlgorithmConfig, HuggingFaceImageTextGenerationInferenceAlgorithmConfig, HuggingFaceTextGenerationInferenceAlgorithmConfig, HuggingFacePerplexityEvaluationAlgorithmConfig, PrivateSqlQueryAlgorithmConfig, SqlQueryAlgorithmConfig, ModelInferenceAlgorithmConfig, ModelEvaluationAlgorithmConfig, ModelTrainingAndEvaluationAlgorithmConfig, FederatedModelTrainingAlgorithmConfig, GenericAlgorithmConfig]]]
- static
data_structure : DataStructureConfig
- static
primary_results_path : Optional[str]
- static
protocol : Union[EHRNERProtocolConfig, WetAMDScreeningProtocolSapphireConfig, InSiteInsightsProtocolConfig, InferenceAndImageOutputConfig, DataExtractionProtocolCharcoalConfig, NextGenSearchProtocolConfig, GAScreeningProtocolCharcoalConfig, GAScreeningProtocolBronzeWithEHRConfig, GAScreeningProtocolBronzeConfig, GAScreeningProtocolAmethystConfig, GAScreeningProtocolJadeConfig, FluidVolumeScreeningProtocolConfig, RetinalDiseaseProtocolCobaltConfig, InferenceAndReturnCSVReportConfig, InstrumentedInferenceAndCSVReportConfig, InferenceAndCSVReportConfig, FederatedAveragingProtocolConfig, ResultsOnlyProtocolConfig, GenericProtocolConfig]
- static
transformation_file : Optional[pathlib.Path]
TaskFilterConfig
class TaskFilterConfig( filter_type: str, value: Union[Date, DateTD, int, float, list[str], str],):Configuration for a single task-level filter.
Arguments
-
filter_type: The type of filter (kebab-case string matching TaskFilterType). -
value: The filter value. Can be a templated string (e.g.,"{{ variable }}")or an actual value. Type depends on filter_type:
- Date filters: dict with year (required), month (optional), day (optional)
- Size filters: float (MB)
- Frame filters: int
- check-required-fields: list[str] of required field names
- modality: str, either "OCT" or "SLO"
TemplatedModellerConfig
class TemplatedModellerConfig( pods: PodsConfig, task: TaskConfig, secrets: Optional[APIKeys | ExternallyManagedJWT | dict[SecretsUse, APIKeys | ExternallyManagedJWT]] = 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.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, test_run: bool = False, force_rerun_failed_files: bool = True, enable_anonymized_tracker_upload: bool = False, requires_ehr_connection: bool = False, template: Optional[dict[str, TemplateVariablesEntryString | TemplateVariablesEntryNumber | TemplateVariablesEntryArray | TemplateVariablesEntryFilePath | TemplateVariablesEntryModelSlug | TemplateVariablesEntrySchemaColumnName | TemplateVariablesEntrySchemaColumnNameArray | TemplateVariablesEntryBool | TemplateVariablesEntryTaskFilters]] = None,):Schema for task templates.