monailabel.config module

class monailabel.config.Settings(_case_sensitive=None, _env_prefix=None, _env_file=PosixPath('.'), _env_file_encoding=None, _env_ignore_empty=None, _env_nested_delimiter=None, _env_parse_none_str=None, _secrets_dir=None, **values)[source]

Bases: pydantic_settings.main.BaseSettings

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

MONAI_LABEL_API_STR: str
MONAI_LABEL_APP_CONF: Dict[str, Any]
MONAI_LABEL_APP_DIR: str
MONAI_LABEL_AUTH_CLIENT_ID: str
MONAI_LABEL_AUTH_ENABLE: bool
MONAI_LABEL_AUTH_REALM_URI: str
MONAI_LABEL_AUTH_ROLE_ADMIN: str
MONAI_LABEL_AUTH_ROLE_ANNOTATOR: str
MONAI_LABEL_AUTH_ROLE_REVIEWER: str
MONAI_LABEL_AUTH_ROLE_USER: str
MONAI_LABEL_AUTH_TIMEOUT: int
MONAI_LABEL_AUTH_TOKEN_EMAIL: str
MONAI_LABEL_AUTH_TOKEN_NAME: str
MONAI_LABEL_AUTH_TOKEN_ROLES: str
MONAI_LABEL_AUTH_TOKEN_USERNAME: str
MONAI_LABEL_AUTO_UPDATE_SCORING: bool
MONAI_LABEL_CORS_ORIGINS: List[pydantic_core._pydantic_core.Url[pydantic_core._pydantic_core.Url]]
MONAI_LABEL_DATASTORE: str
MONAI_LABEL_DATASTORE_API_KEY: str
MONAI_LABEL_DATASTORE_ASSET_PATH: str
MONAI_LABEL_DATASTORE_AUTO_RELOAD: bool
MONAI_LABEL_DATASTORE_CACHE_PATH: str
MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS: str
MONAI_LABEL_DATASTORE_FILE_EXT: List[str]
MONAI_LABEL_DATASTORE_PASSWORD: str
MONAI_LABEL_DATASTORE_PROJECT: str
MONAI_LABEL_DATASTORE_READ_ONLY: bool
MONAI_LABEL_DATASTORE_URL: str
MONAI_LABEL_DATASTORE_USERNAME: str
MONAI_LABEL_DICOMWEB_CACHE_EXPIRY: int
MONAI_LABEL_DICOMWEB_CACHE_PATH: str
MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI: bool
MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME: bool
MONAI_LABEL_DICOMWEB_PASSWORD: str
MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT: float
MONAI_LABEL_DICOMWEB_READ_TIMEOUT: float
MONAI_LABEL_DICOMWEB_SEARCH_FILTER: Dict[str, Any]
MONAI_LABEL_DICOMWEB_USERNAME: str
MONAI_LABEL_INFER_CONCURRENCY: int
MONAI_LABEL_INFER_TIMEOUT: int
MONAI_LABEL_PROJECT_NAME: str
MONAI_LABEL_QIDO_PREFIX: Optional[str]
MONAI_LABEL_SERVER_PORT: int
MONAI_LABEL_SESSIONS: bool
MONAI_LABEL_SESSION_EXPIRY: int
MONAI_LABEL_SESSION_PATH: str
MONAI_LABEL_STOW_PREFIX: Optional[str]
MONAI_LABEL_STUDIES: str
MONAI_LABEL_TASKS_BATCH_INFER: bool
MONAI_LABEL_TASKS_SCORING: bool
MONAI_LABEL_TASKS_STRATEGY: bool
MONAI_LABEL_TASKS_TRAIN: bool
MONAI_LABEL_TRACKING_ENABLED: bool
MONAI_LABEL_TRACKING_URI: str
MONAI_LABEL_WADO_PREFIX: Optional[str]
MONAI_ZOO_AUTH_TOKEN: str
MONAI_ZOO_REPO: str
MONAI_ZOO_SOURCE: str
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': True, 'env_file': '.env', 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'MONAI_LABEL_API_STR': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_APP_CONF': FieldInfo(annotation=Dict[str, Any], required=False, default={}), 'MONAI_LABEL_APP_DIR': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_AUTH_CLIENT_ID': FieldInfo(annotation=str, required=False, default='monailabel-app'), 'MONAI_LABEL_AUTH_ENABLE': FieldInfo(annotation=bool, required=False, default=False), 'MONAI_LABEL_AUTH_REALM_URI': FieldInfo(annotation=str, required=False, default='http://localhost:8080/realms/monailabel'), 'MONAI_LABEL_AUTH_ROLE_ADMIN': FieldInfo(annotation=str, required=False, default='monailabel-admin'), 'MONAI_LABEL_AUTH_ROLE_ANNOTATOR': FieldInfo(annotation=str, required=False, default='monailabel-annotator'), 'MONAI_LABEL_AUTH_ROLE_REVIEWER': FieldInfo(annotation=str, required=False, default='monailabel-reviewer'), 'MONAI_LABEL_AUTH_ROLE_USER': FieldInfo(annotation=str, required=False, default='monailabel-user'), 'MONAI_LABEL_AUTH_TIMEOUT': FieldInfo(annotation=int, required=False, default=10), 'MONAI_LABEL_AUTH_TOKEN_EMAIL': FieldInfo(annotation=str, required=False, default='email'), 'MONAI_LABEL_AUTH_TOKEN_NAME': FieldInfo(annotation=str, required=False, default='name'), 'MONAI_LABEL_AUTH_TOKEN_ROLES': FieldInfo(annotation=str, required=False, default='realm_access#roles'), 'MONAI_LABEL_AUTH_TOKEN_USERNAME': FieldInfo(annotation=str, required=False, default='preferred_username'), 'MONAI_LABEL_AUTO_UPDATE_SCORING': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_CORS_ORIGINS': FieldInfo(annotation=List[Annotated[pydantic_core._pydantic_core.Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)]], required=False, default=[]), 'MONAI_LABEL_DATASTORE': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_API_KEY': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_ASSET_PATH': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_AUTO_RELOAD': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_DATASTORE_CACHE_PATH': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_FILE_EXT': FieldInfo(annotation=List[str], required=False, default=['*.nii.gz', '*.nii', '*.nrrd', '*.jpg', '*.png', '*.tif', '*.svs', '*.xml']), 'MONAI_LABEL_DATASTORE_PASSWORD': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_PROJECT': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_READ_ONLY': FieldInfo(annotation=bool, required=False, default=False), 'MONAI_LABEL_DATASTORE_URL': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DATASTORE_USERNAME': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DICOMWEB_CACHE_EXPIRY': FieldInfo(annotation=int, required=False, default=7200), 'MONAI_LABEL_DICOMWEB_CACHE_PATH': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME': FieldInfo(annotation=bool, required=False, default=False), 'MONAI_LABEL_DICOMWEB_PASSWORD': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT': FieldInfo(annotation=float, required=False, default=30.0), 'MONAI_LABEL_DICOMWEB_READ_TIMEOUT': FieldInfo(annotation=float, required=False, default=5.0), 'MONAI_LABEL_DICOMWEB_SEARCH_FILTER': FieldInfo(annotation=Dict[str, Any], required=False, default={'Modality': 'CT'}), 'MONAI_LABEL_DICOMWEB_USERNAME': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_INFER_CONCURRENCY': FieldInfo(annotation=int, required=False, default=-1), 'MONAI_LABEL_INFER_TIMEOUT': FieldInfo(annotation=int, required=False, default=600), 'MONAI_LABEL_PROJECT_NAME': FieldInfo(annotation=str, required=False, default='MONAILabel'), 'MONAI_LABEL_QIDO_PREFIX': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'MONAI_LABEL_SERVER_PORT': FieldInfo(annotation=int, required=False, default=8000), 'MONAI_LABEL_SESSIONS': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_SESSION_EXPIRY': FieldInfo(annotation=int, required=False, default=3600), 'MONAI_LABEL_SESSION_PATH': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_STOW_PREFIX': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'MONAI_LABEL_STUDIES': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_TASKS_BATCH_INFER': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_TASKS_SCORING': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_TASKS_STRATEGY': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_TASKS_TRAIN': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_TRACKING_ENABLED': FieldInfo(annotation=bool, required=False, default=True), 'MONAI_LABEL_TRACKING_URI': FieldInfo(annotation=str, required=False, default=''), 'MONAI_LABEL_WADO_PREFIX': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'MONAI_ZOO_AUTH_TOKEN': FieldInfo(annotation=str, required=False, default=''), 'MONAI_ZOO_REPO': FieldInfo(annotation=str, required=False, default='Project-MONAI/model-zoo/hosting_storage_v1'), 'MONAI_ZOO_SOURCE': FieldInfo(annotation=str, required=False, default='monaihosting')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.