chap_core.external package¶
Submodules¶
chap_core.external.external_model module¶
chap_core.external.github module¶
chap_core.external.mlflow_wrappers module¶
chap_core.external.model_configuration module¶
- class chap_core.external.model_configuration.CommandConfig(*, command: str, parameters: dict[str, str] | None = None)[source]¶
Bases:
BaseModel- command: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parameters: dict[str, str] | None¶
- class chap_core.external.model_configuration.DockerEnvConfig(*, image: str)[source]¶
Bases:
BaseModel- image: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class chap_core.external.model_configuration.EntryPointConfig(*, train: CommandConfig, predict: CommandConfig)[source]¶
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- predict: CommandConfig¶
- train: CommandConfig¶
- class chap_core.external.model_configuration.ModelTemplateConfigCommon(*, supported_period_type: ~chap_core.model_spec.PeriodType = PeriodType.any, user_options: dict | None = <factory>, hpo_search_space: dict | None = None, required_covariates: ~typing.List[str] = <factory>, target: str = 'disease_cases', allow_free_additional_continuous_covariates: bool = False, meta_data: ~chap_core.database.model_templates_and_config_tables.ModelTemplateMetaData = ModelTemplateMetaData(display_name='No Display Name yet', description='No Description yet', author_note='No Author note yet', author_assessed_status=<AuthorAssessedStatus.red: 'red'>, author='Unknown Author', organization=None, organization_logo_url=None, contact_email=None, citation_info=None))[source]¶
Bases:
ModelTemplateInformation- meta_data: ModelTemplateMetaData¶
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'registry': PydanticUndefined}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class chap_core.external.model_configuration.ModelTemplateConfigV2(*, entry_points: ~chap_core.external.model_configuration.EntryPointConfig | None = None, docker_env: ~chap_core.external.model_configuration.DockerEnvConfig | None = None, python_env: str | None = None, supported_period_type: ~chap_core.model_spec.PeriodType = PeriodType.any, user_options: dict | None = <factory>, hpo_search_space: dict | None = None, required_covariates: ~typing.List[str] = <factory>, target: str = 'disease_cases', allow_free_additional_continuous_covariates: bool = False, meta_data: ~chap_core.database.model_templates_and_config_tables.ModelTemplateMetaData = ModelTemplateMetaData(display_name='No Display Name yet', description='No Description yet', author_note='No Author note yet', author_assessed_status=<AuthorAssessedStatus.red: 'red'>, author='Unknown Author', organization=None, organization_logo_url=None, contact_email=None, citation_info=None), name: str, source_url: str | None = None, adapters: dict[str, str] | None = None, rest_api_url: str | None = None, version: str | None = None)[source]¶
Bases:
ModelTemplateConfigCommon,RunnerConfigThis is used to parse MLProject files
- adapters: dict[str, str] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': True, 'registry': PydanticUndefined}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- rest_api_url: str | None¶
- source_url: str | None¶
- version: str | None¶
- class chap_core.external.model_configuration.RunnerConfig(*, entry_points: EntryPointConfig | None = None, docker_env: DockerEnvConfig | None = None, python_env: str | None = None)[source]¶
Bases:
BaseModelThis is all needed to actually run model
- docker_env: DockerEnvConfig | None¶
- entry_points: EntryPointConfig | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- python_env: str | None¶