chap_core.rest_api.v1 package¶
Submodules¶
chap_core.rest_api.v1.debug module¶
- chap_core.rest_api.v1.debug.get_status(task_id: str | None = None) dict[source]¶
Get the status and result of a task.
chap_core.rest_api.v1.jobs module¶
- class chap_core.rest_api.v1.jobs.DataBaseResponse(*, id: int)[source]¶
Bases:
BaseModel- id: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class chap_core.rest_api.v1.jobs.NaiveJob(func, *args, **kwargs)[source]¶
Bases:
object- property exception_info¶
- property id¶
- property is_finished¶
- property progress¶
- property result¶
- property status¶
- chap_core.rest_api.v1.jobs.get_database_result(job_id: str) DataBaseResponse[source]¶
- chap_core.rest_api.v1.jobs.get_evaluation_result(job_id: str) EvaluationResponse[source]¶
- chap_core.rest_api.v1.jobs.get_prediction_result(job_id: str) FullPredictionResponse[source]¶
- chap_core.rest_api.v1.jobs.list_jobs(ids: List[str] = Query(None), status: List[str] = Query(None), type: str = Query(None)) List[JobDescription][source]¶
List all jobs currently in the queue. Optionally filters by a list of job IDs, a list of statuses, and/or a job type. Filtering order: IDs, then type, then status.
chap_core.rest_api.v1.rest_api module¶
- class chap_core.rest_api.v1.rest_api.CompatibilityResponse(*, compatible: bool, description: str)[source]¶
Bases:
BaseModel- compatible: bool¶
- description: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class chap_core.rest_api.v1.rest_api.HealthResponse(*, status: str, message: str)[source]¶
Bases:
BaseModel- message: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: str¶
- class chap_core.rest_api.v1.rest_api.State(*, ready: bool, status: str, progress: float = 0)[source]¶
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- progress: float¶
- ready: bool¶
- status: str¶
- class chap_core.rest_api.v1.rest_api.SystemInfoResponse(*, chap_core_version: str, python_version: str, os: str)[source]¶
Bases:
BaseModel- chap_core_version: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- os: str¶
- python_version: str¶
- async chap_core.rest_api.v1.rest_api.get_evaluation_results() EvaluationResponse[source]¶
Retrieve evaluation results made by the model
- async chap_core.rest_api.v1.rest_api.get_exception() str[source]¶
Retrieve exception information if the job failed
- async chap_core.rest_api.v1.rest_api.get_results() FullPredictionResponse[source]¶
Retrieve results made by the model
- async chap_core.rest_api.v1.rest_api.get_status() State[source]¶
Retrieve the current status of the model
- async chap_core.rest_api.v1.rest_api.health(worker_config=Depends(dependency=<functools._lru_cache_wrapper object>, use_cache=True, scope=None)) HealthResponse[source]¶
- async chap_core.rest_api.v1.rest_api.is_compatible(modelling_app_version: str) CompatibilityResponse[source]¶
Check if the modelling app version is compatible with the current API version
- async chap_core.rest_api.v1.rest_api.list_features() list[Feature][source]¶
List all available features
- async chap_core.rest_api.v1.rest_api.list_models() list[ModelSpec][source]¶
List all available models. These are not validated. Should set up test suite to validate them
- async chap_core.rest_api.v1.rest_api.system_info() SystemInfoResponse[source]¶
Retrieve system information