Skip to main content

Functions

Overview

In order to facilitate working with TIM through Python, different functions exist which combine the functionalities of different endpoints in the TIM API. This allows the user to quickly and seamlessly manage their time series experiments. The table below provides an overview of the existing functions in the Python Client for TIM.

FunctionSection
poll_dataset_version_statusDatasets
upload_datasetDatasets
update_datasetDatasets
poll_forecast_statusForecasting
forecasting_job_resultsForecasting
execute_forecast_jobForecasting
forecasting_build_modelForecasting
forecasting_predictForecasting
forecasting_rebuild_modelForecasting
forecasting_retrain_modelForecasting
forecasting_results_rcaForecasting
forecasting_root_cause_analysisForecasting
forecasting_what_if_analysisForecasting
quick_forecastForecasting
poll_detect_statusDetection
detection_job_resultsDetection
execute_detection_jobDetection
detection_build_kpi_modelDetection
detection_build_system_modelDetection
detection_build_outlier_modelDetection
detection_build_drift_model_kolmogorov_smirnovDetection
detection_build_drift_model_jensen_shannonDetection
detection_rebuild_kpi_modelDetection
detection_detectDetection
detection_results_rcaDetection
detection_root_cause_analysisDetection
detection_what_if_analysisDetection

Datasets

This chapter covers all the functions in the Python Client for TIM around dataset management.

poll_dataset_version_status

This function allows the user to check the status of a dataset upload or update. By providing a valid TIM dataset ID and dataset version ID the user can execute this function. This function will check the upload or update status until the job is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

poll_dataset_version_status = client.poll_dataset_version_status(
id = dataset_id,
version_id = dataset_version_id,
status_poll = print,
tries_left = 300,
)

The response will return the latest status of the dataset upload or update in JSON form.

upload_dataset

This function allows the user to upload a new dataset to the TIM repository A valid pandas dataframe and JSON configuration are required to use this function. If wait to finish is set to 'True', this function will check the upload status until the job is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API. If set to 'False', the function will return the initial upload response with TIM ID information. Lastly, the user can choose which information to return from the API if wait_to_finish is set to 'True'. The user has the following options:

  • response: A JSON structure with TIM ID information
  • logs: A JSON array with log information about the upload process.
  • details: A JSON structure with metadata about the dataset uploaded to TIM.
upload_dataset = client.upload_dataset(
dataset = dataset,
configuration = upload_dataset_configuration,
wait_to_finish = True,
outputs = [
'response',
'logs',
'details'
],
status_poll = print,
tries_left = 300,
)

update_dataset

This function allows the user to upload a new dataset to the TIM repository A valid TIM dataset id, pandas dataframe and JSON configuration are required to use this function. If wait to finish is set to 'True', this function will check the update status until the job is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API. If set to 'False', the function will return the initial update response with TIM ID information. Lastly, the user can choose which information to return from the API if wait_to_finish is set to 'True'. The user has the following options:

  • response: A JSON structure with TIM ID information
  • logs: A JSON array with log information about the update process.
  • details: A JSON structure with metadata about the dataset updated to TIM.
update_dataset = client.update_dataset(
dataset_id = dataset_id,
dataset_version = dataset_version,
configuration = update_dataset_configuration,
wait_to_finish = True,
outputs = [
'response',
'logs',
'details'
],
status_poll = print,
tries_left = 300,
)

Forecasting

This chapter covers all the functions in the Python Client for TIM about managing forecasting jobs.

poll_forecast_status

This function allows the user to check the status of a forecast job. By providing a valid TIM forecast job ID the user can execute this function. This function will check the job status until the job is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.
The response will return the latest status of the job in JSON form.

poll_forecast_status = client.poll_forecast_status(
id = job_id,
status_poll = print,
tries_left = 300
)

forecasting_job_results

This functions allows the user to collect different types of outputs from a finished forecasting job. A valid TIM forecasting job ID is required to use this function.
The user can choose to include or exclude any of the following options:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return results for all types of outputs.

forecasting_job_results = client.forecasting_job_results(
id = job_id,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies',
'production_table',
'production_accuracies'
]
)

execute_forecast_job

This function allows the user to execute a registered forecasting job. A valid TIM forecasting job ID is required to use this function.

If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API. If set to 'False', the function will return the initial response with TIM ID information.

If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return a message a status response from the API.

execute_forecast_job = client.execute_forecast_job(
id = job_id,
wait_to_finish = False,
outputs = None,
status_poll = print,
tries_left = 300
)

forecasting_build_model

This function allows the user to register, execute and collect the results of a forecasting build model job. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

forecasting_build_model = client.forecasting_build_model(
configuration = forecast_build_model_configuration,
dataset_id = dataset_id,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies',
'production_table',
'production_accuracies'
],
status_poll = print,
tries_left = 300
)

forecasting_predict

This function allows the user to register, execute and collect the results of a forecasting predict job. A valid TIM parent job ID from a previously built model and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return the following outputs by default: [id','logs','status','table'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

forecasting_predict = client.forecasting_predict(
parent_job_id = parent_job_id,
configuration = forecast_predict_configuration,
execute = False,
wait_to_finish = False,
outputs = [
'id',
'logs',
'status',
'table',
],
status_poll = print,
tries_left = 300
)

forecasting_rebuild_model

This function allows the user to register, execute and collect the results of a forecasting rebuild model job. A valid TIM parent job ID from a previously built model and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

forecasting_rebuild_model = client.forecasting_rebuild_model(
parent_job_id = parent_job_id,
configuration = forecast_rebuild_model_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies',
'production_table',
'production_accuracies'
],
status_poll = print,
tries_left = 300
)

forecasting_retrain_model

This function allows the user to register, execute and collect the results of a forecasting retrain model job. A valid TIM parent job ID from a previously built model and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

forecasting_retrain_model = client.forecasting_retrain_model(
parent_job_id = parent_job_id,
configuration = forecast_retrain_model_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies',
'production_table',
'production_accuracies'
],
status_poll = print,
tries_left = 300
)

forecasting_results_rca

This function allows the user to collect the results of a forecasting root cause analysis job. A valid TIM forecasting job ID from an executed RCA job is required to use this function. The user can choose to provide the forecasting parent job ID of the RCA job to facilitate the collection of job details. Next the user can filter for specific model indices and select a timestamp and a radius of number of samples around that sample to extract RCA information for.

The user can also choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • results: A dataframe with the root cause analysis values.
forecasting_results_rca = client.forecasting_results_rca(
id = forecasting_root_cause_analysis_id,
indices_of_model = None,
parent_job_id = parent_job_id,
timestamp = None,
radius = None,
outputs = [
'id',
'details',
'logs',
'status',
'results'
],
)

forecasting_root_cause_analysis

This function allows the user to register, execute and collect the results of a forecasting root cause analysis job. A valid TIM forecasting parent job ID is required to use this function. Next the user can filter for specific model indices and select a timestamp and a radius of number of samples around that sample to extract RCA information for.

If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • results: A dataframe with the root cause analysis values. If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.
forecasting_root_cause_analysis = client.forecasting_root_cause_analysis(
parent_job_id = parent_job_id,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'results'
],
indices_of_model = None,
timestamp = None,
radius = None,
status_poll = print,
tries_left = 300
)

forecasting_what_if_analysis

This function allows the user to register, execute and collect the results of a forecasting what-if job. A valid TIM parent job ID from a previously built model and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.

If not provided, this function will return the following outputs by default: [id','table'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

forecasting_what_if = client.forecasting_what_if_analysis(
parent_job_id = parent_job_id,
configuration = forecasting_what_if_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies'
],
status_poll = print,
tries_left = 300
)

quick_forecast

This function is a combination of the upload_data and forecasting_build_model methods. It is designed to offer the user a quick and easy way to build forecasting models with TIM in an experimental context without having to manage MLOps.

This function allows the user to upload a new dataset and register, execute and collect the results of a forecasting build model job on that new dataset. Lastly in order to keep a clean work environment within TIM, the user can choose to delete all information from TIM after receiving the results from the API.

A valid datafrale and JSON configuration for the data upload and for the build model job are required to use this function.

The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the forecasted values and additional information.
  • production_forecast: A dataframe with the forecasted values.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy if in-sample and out-of sample results.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return the following outputs by default: [id','status','table'] If wait to finish is set to 'True', this function will check the data upload and job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API. If wait to finish is set to 'True' and delete_items is set to 'True' all items generated in TIM by this function are deleted after collection of the results.

quick_forecast = client.quick_forecast(
dataset = dataset,
job_configuration = forecast_build_model_configuration,
workspace_id = None,
dataset_configuration = dataset_upload_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'production_forecast',
'model',
'accuracies',
'production_table',
'production_accuracies'
],
status_poll = print,
tries_left = 300,
delete_items = False
)

Detection

This chapter covers all the functions in the Python Client for TIM about managing detection jobs.

poll_detect_status

This function allows the user to check the status of a detection job. By providing a valid TIM detection job ID the user can execute this function. This function will check the job status until the job is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.
The response will return the latest status of the job in JSON form.

poll_detect_status = client.poll_detect_status(
id = detection_job_id,
status_poll = print,
tries_left = 300
)

detection_job_results

This functions allows the user to collect different types of outputs from a finished detection job. A valid TIM detection job ID is required to use this function.
The user can choose to include or exclude any of the following options:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.
  • production_table: A dataframe with table results of all jobs in the sequence of this job ID.
  • production_accuracies: A JSON structure with information about the production accuracy of all jobs in the sequence of this job ID.

If not provided, this function will return results the following types of outputs: ['id','details','logs','status','table','model','accuracies'].

detection_job_results = client.detection_job_results(
id = detection_job_id,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'model',
'accuracies',
'production_table',
'production_accuracies'
]
)

execute_detection_job

This function allows the user to execute a registered detection job. A valid TIM detection job ID is required to use this function.

If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API. If set to 'False', the function will return the initial response with TIM ID information.

If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return a message a status response from the API.

execute_detection_job = client.execute_detection_job(
id = detection_job_id,
wait_to_finish = True,
outputs = None,
status_poll = print,
tries_left = 300
)

detection_build_kpi_model

This function allows the user to register, execute and collect the results of a detection build model job with the KPI-driven approach. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_build_kpi_model = client.detection_build_kpi_model(
configuration = detection_build_kpi_model_configuration,
dataset_id = dataset_id,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'model',
'accuracies'
],
status_poll = print,
tries_left = 300
)

detection_build_system_model

This function allows the user to register, execute and collect the results of a detection build model job with the system-driven approach. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_build_system_model = client.detection_build_system_model(
configuration = detection_build_system_model_configuration,
dataset_id = dataset_id,
execute = False,
wait_to_finish = False,
outputs = [
'id',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_build_outlier_model

This function allows the user to register, execute and collect the results of a detection build outlier model job. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_build_outlier_model = client.detection_build_outlier_model(
configuration = detection_build_outlier_model_configuration,
dataset_id = dataset_id,
execute = False,
wait_to_finish = False,
outputs = [
'id',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_build_drift_model_kolmogorov_smirnov

This function allows the user to register, execute and collect the results of a detection build drift model job with the Kolmogorov-Smirnov approach. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_build_drift_model_kolmogorov_smirnov = client.detection_build_drift_model_kolmogorov_smirnov(
configuration = detection_build_drift_model_kolmogorov_smirnov_configuration,
dataset_id = dataset_id,
execute = False,
wait_to_finish = False,
outputs = [
'id',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_build_drift_model_jensen_shannon

This function allows the user to register, execute and collect the results of a detection build drift model job with the Jensen-Shannon approach. A valid TIM dataset ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_build_drift_model_jensen_shannon = client.detection_build_drift_model_jensen_shannon(
configuration = detection_build_drift_model_jensen_shannon_configuration,
dataset_id = dataset_id,
execute = False,
wait_to_finish = False,
outputs = [
'id',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_rebuild_kpi_model

This function allows the user to register, execute and collect the results of a detection rebuild model job with the KPI-driven approach. A valid TIM detection parent job ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table','model','accuracies'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_rebuild_kpi_model = client.detection_rebuild_kpi_model(
parent_job_id = detection_parent_job_id,
configuration = detection_rebuild_kpi_model_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_detect

This function allows the user to register, execute and collect the results of a detection detect job with both the KPI-driven and system-driven approach. A valid TIM detection parent job ID and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','logs','status','table'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_detect = client.detection_detect(
parent_job_id = detection_parent_job_id,
configuration = detection_detect_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'model',
'accuracies',
],
status_poll = print,
tries_left = 300
)

detection_results_rca

This function allows the user to collect the results of a detection root cause analysis job. A valid TIM detection job ID from an executed RCA job is required to use this function. The user can filter for specific model indices and select a timestamp and a radius of number of samples around that sample to extract RCA information for.

The user can also choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • results: A dataframe with the root cause analysis values.
detection_results_rca = client.detection_results_rca(
id = detection_root_cause_analysis_id,
index_of_model = None,
timestamp = None,
radius = None,
outputs = [
'id',
'details',
'logs',
'status'
'results',
]
)

detection_root_cause_analysis

This function allows the user to register, execute and collect the results of a detection root cause analysis job. A valid TIM detection parent job ID is required to use this function. Next the user can filter for specific model indices and select a timestamp and a radius of number of samples around that sample to extract RCA information for.

If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • results: A dataframe with the root cause analysis values. If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.
detection_root_cause_analysis = client.detection_root_cause_analysis(
parent_job_id = detection_parent_job_id,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'results'
],
index_of_model = None,
timestamp = None,
radius = None,
status_poll = print,
tries_left = 300
)

detection_what_if_analysis

This function allows the user to register, execute and collect the results of a detection what-if job. A valid TIM parent job ID from a previously built model and JSON configuration are required to use this function. The user can choose to execute the function or only register the job within TIM for later execution. If execute is set to 'True', the user can choose to wait for the job to finish or let the job run within TIM. If wait to finish is set to 'True', the user can choose to include or exclude any of the following options in the response:

  • id: The job id provided in the request for traceability.
  • details: A JSON structure with metadata about the job.
  • logs: A JSON array with log information about the job execution process.
  • status: A JSON structure with the latest status of the job.
  • table: A dataframe with the detected values and additional information.
  • model: The model created by TIM to calculate these values.
  • accuracies: A JSON structure with information about the accuracy in case of labeled data.

If not provided, this function will return the following outputs by default: [id','table'] If wait to finish is set to 'True', this function will check the job status until it is finished, failed or until the number of tries has exceeded the limit. The user can choose to print out the status responses for live feedback from the API.

detection_what_if = client.detection_what_if_analysis(
parent_job_id = detection_detect_id,
configuration = detection_what_if_configuration,
execute = True,
wait_to_finish = True,
outputs = [
'id',
'details',
'logs',
'status',
'table',
'model',
'accuracies'
],
status_poll = print,
tries_left = 300
)