All URIs are relative to https://api.whylabsapp.com
Method | HTTP request | Description |
---|---|---|
add_resource_tag | POST /v0/organizations/{org_id}/models/{dataset_id}/resource-tag | Add a resource tag to a dataset |
create_model | POST /v0/organizations/{org_id}/models | Create a model with a given name and a time period |
deactivate_model | DELETE /v0/organizations/{org_id}/models/{model_id} | Mark a model as inactive |
delete_entity_schema | DELETE /v0/organizations/{org_id}/models/{dataset_id}/schema | Delete the entity schema config for a given dataset. |
delete_entity_schema_column | DELETE /v0/organizations/{org_id}/models/{dataset_id}/schema/column/{column_id} | Delete the entity schema of a single column for a given dataset. |
delete_entity_schema_metric | DELETE /v0/organizations/{org_id}/models/{dataset_id}/schema/metric/{metric_name} | Delete the schema of a single metric for a given dataset. |
delete_resource_tag | DELETE /v0/organizations/{org_id}/models/{dataset_id}/resource-tag | Delete a resource tag to a dataset. |
get_entity_schema | GET /v0/organizations/{org_id}/models/{dataset_id}/schema | Get the entity schema config for a given dataset. |
get_entity_schema_column | GET /v0/organizations/{org_id}/models/{dataset_id}/schema/column/{column_id} | Get the entity schema of a single column for a given dataset. |
get_model | GET /v0/organizations/{org_id}/models/{model_id} | Get a model metadata |
get_named_metric_schemas | GET /v0/organizations/{org_id}/models/{dataset_id}/schema/metrics | Get all of the named metrics for a given dataset. |
list_models | GET /v0/organizations/{org_id}/models | Get a list of all of the model ids for an organization. |
list_resource_tags | GET /v0/organizations/{org_id}/models/{dataset_id}/resource-tag/list | List resource tags for a dataset. |
put_entity_schema | PUT /v0/organizations/{org_id}/models/{dataset_id}/schema | Save the entity schema config for a given dataset. |
put_entity_schema_column | PUT /v0/organizations/{org_id}/models/{dataset_id}/schema/column/{column_id} | Save the entity schema of a single column for a given dataset. |
put_entity_schema_metric | PUT /v0/organizations/{org_id}/models/{dataset_id}/schema/metric | Save the schema of a single metric for a given dataset. |
put_named_metric_schema | PUT /v0/organizations/{org_id}/models/{dataset_id}/schema/metric/{metric_name} | Save the schema of a single named metric for a given dataset. |
reinfer_entity_schema | PUT /v0/organizations/{org_id}/models/{dataset_id}/schema/reinfer | Reinfers the entity schema config for a given dataset. |
update_model | PUT /v0/organizations/{org_id}/models/{model_id} | Update a model's metadata |
update_resource_tag | PUT /v0/organizations/{org_id}/models/{dataset_id}/resource-tag | Update a resource tag to a dataset. |
Response add_resource_tag(org_id, dataset_id, resource_tag)
Add a resource tag to a dataset
Add a resource tag to a dataset
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.resource_tag import ResourceTag
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
resource_tag = ResourceTag(
key="key_example",
value="value_example",
) # ResourceTag |
# example passing only required values which don't have defaults set
try:
# Add a resource tag to a dataset
api_response = api_instance.add_resource_tag(org_id, dataset_id, resource_tag)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->add_resource_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
resource_tag | ResourceTag |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | AddResourceTag 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelMetadataResponse create_model(org_id, model_name, time_period)
Create a model with a given name and a time period
Create a model
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.model_metadata_response import ModelMetadataResponse
from whylabs_client.model.model_type import ModelType
from whylabs_client.model.time_period import TimePeriod
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str | The organization ID
model_name = "Credit-Score-1" # str | The name of a model
time_period = TimePeriod("P1D") # TimePeriod | The \\[TimePeriod\\] for data aggregation/alerting for a model
model_type = ModelType("CLASSIFICATION") # ModelType | The \\[ModelType\\] of the dataset (optional)
model_id = "model-123" # str, none_type | (optional)
# example passing only required values which don't have defaults set
try:
# Create a model with a given name and a time period
api_response = api_instance.create_model(org_id, model_name, time_period)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->create_model: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Create a model with a given name and a time period
api_response = api_instance.create_model(org_id, model_name, time_period, model_type=model_type, model_id=model_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->create_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | The organization ID | |
model_name | str | The name of a model | |
time_period | TimePeriod | The \[TimePeriod\] for data aggregation/alerting for a model | |
model_type | ModelType | The \[ModelType\] of the dataset | [optional] |
model_id | str, none_type | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The \[ModelMetadataResponse\] if operation succeeds | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelMetadataResponse deactivate_model(org_id, model_id)
Mark a model as inactive
Mark a model as inactive
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.model_metadata_response import ModelMetadataResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str | The organization ID
model_id = "model-123" # str | The model ID
# example passing only required values which don't have defaults set
try:
# Mark a model as inactive
api_response = api_instance.deactivate_model(org_id, model_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->deactivate_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | The organization ID | |
model_id | str | The model ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The \[ModelMetadataResponse\] if operation succeeds | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response delete_entity_schema(org_id, dataset_id)
Delete the entity schema config for a given dataset.
Delete the entity schema config for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
# example passing only required values which don't have defaults set
try:
# Delete the entity schema config for a given dataset.
api_response = api_instance.delete_entity_schema(org_id, dataset_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->delete_entity_schema: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | DeleteEntitySchema 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response delete_entity_schema_column(org_id, dataset_id, column_id)
Delete the entity schema of a single column for a given dataset.
Delete the entity schema of a single column for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
column_id = "feature-123" # str |
# example passing only required values which don't have defaults set
try:
# Delete the entity schema of a single column for a given dataset.
api_response = api_instance.delete_entity_schema_column(org_id, dataset_id, column_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->delete_entity_schema_column: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
column_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | DeleteEntitySchemaColumn 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response delete_entity_schema_metric(org_id, dataset_id, metric_name)
Delete the schema of a single metric for a given dataset.
Delete the schema of a single metric for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
metric_name = "estimated_performance_median" # str |
# example passing only required values which don't have defaults set
try:
# Delete the schema of a single metric for a given dataset.
api_response = api_instance.delete_entity_schema_metric(org_id, dataset_id, metric_name)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->delete_entity_schema_metric: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
metric_name | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | DeleteEntitySchemaMetric 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response delete_resource_tag(org_id, dataset_id, resource_tag)
Delete a resource tag to a dataset.
Delete a resource tag to a dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.resource_tag import ResourceTag
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
resource_tag = ResourceTag(
key="key_example",
value="value_example",
) # ResourceTag |
# example passing only required values which don't have defaults set
try:
# Delete a resource tag to a dataset.
api_response = api_instance.delete_resource_tag(org_id, dataset_id, resource_tag)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->delete_resource_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
resource_tag | ResourceTag |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | DeleteResourceTag 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EntitySchema get_entity_schema(org_id, dataset_id)
Get the entity schema config for a given dataset.
Get the entity schema config for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.entity_schema import EntitySchema
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
# example passing only required values which don't have defaults set
try:
# Get the entity schema config for a given dataset.
api_response = api_instance.get_entity_schema(org_id, dataset_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->get_entity_schema: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | GetEntitySchema 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ColumnSchema get_entity_schema_column(org_id, dataset_id, column_id)
Get the entity schema of a single column for a given dataset.
Get the entity schema of a single column for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.column_schema import ColumnSchema
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
column_id = "feature-123" # str |
# example passing only required values which don't have defaults set
try:
# Get the entity schema of a single column for a given dataset.
api_response = api_instance.get_entity_schema_column(org_id, dataset_id, column_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->get_entity_schema_column: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
column_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | GetEntitySchemaColumn 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelMetadataResponse get_model(org_id, model_id)
Get a model metadata
Returns various metadata about a model
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.model_metadata_response import ModelMetadataResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str | The name of an organization
model_id = "model-123" # str | The ID of a model
# example passing only required values which don't have defaults set
try:
# Get a model metadata
api_response = api_instance.get_model(org_id, model_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->get_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | The name of an organization | |
model_id | str | The ID of a model |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A \[ModelMetadataResponse\] object if operation succeeds | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[NamedMetricSchema] get_named_metric_schemas(org_id, dataset_id)
Get all of the named metrics for a given dataset.
Get all of the named metrics for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.named_metric_schema import NamedMetricSchema
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
# example passing only required values which don't have defaults set
try:
# Get all of the named metrics for a given dataset.
api_response = api_instance.get_named_metric_schemas(org_id, dataset_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->get_named_metric_schemas: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | GetNamedMetricSchemas 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListModelsResponse list_models(org_id)
Get a list of all of the model ids for an organization.
Get a list of all of the model ids for an organization.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.list_models_response import ListModelsResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str | Your company's unique organization ID
# example passing only required values which don't have defaults set
try:
# Get a list of all of the model ids for an organization.
api_response = api_instance.list_models(org_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->list_models: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | Your company's unique organization ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A list of model summary items | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[ResourceTag] list_resource_tags(org_id, dataset_id)
List resource tags for a dataset.
List resource tags for a dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.resource_tag import ResourceTag
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
# example passing only required values which don't have defaults set
try:
# List resource tags for a dataset.
api_response = api_instance.list_resource_tags(org_id, dataset_id)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->list_resource_tags: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ListResourceTags 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response put_entity_schema(org_id, dataset_id, entity_schema)
Save the entity schema config for a given dataset.
Save the entity schema config for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.entity_schema import EntitySchema
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
entity_schema = EntitySchema(
columns={
"key": ColumnSchema(
classifier="input",
data_type="fractional",
discreteness="discrete",
tags=[
"tags_example",
],
),
},
metadata=SchemaMetadata(
version=1,
updated_timestamp=1234567890123,
author="user",
),
metrics={
"key": MetricSchema(
label="Estimated prediction median",
column="estimated_prediction",
default_metric="default_metric_example",
builtin_metric="median",
),
},
) # EntitySchema |
# example passing only required values which don't have defaults set
try:
# Save the entity schema config for a given dataset.
api_response = api_instance.put_entity_schema(org_id, dataset_id, entity_schema)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->put_entity_schema: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
entity_schema | EntitySchema |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | PutEntitySchema 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response put_entity_schema_column(org_id, dataset_id, column_id, column_schema)
Save the entity schema of a single column for a given dataset.
Save the entity schema of a single column for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.column_schema import ColumnSchema
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
column_id = "feature-123" # str |
column_schema = ColumnSchema(
classifier="input",
data_type="fractional",
discreteness="discrete",
tags=[
"tags_example",
],
) # ColumnSchema |
# example passing only required values which don't have defaults set
try:
# Save the entity schema of a single column for a given dataset.
api_response = api_instance.put_entity_schema_column(org_id, dataset_id, column_id, column_schema)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->put_entity_schema_column: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
column_id | str | ||
column_schema | ColumnSchema |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | PutEntitySchemaColumn 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response put_entity_schema_metric(org_id, dataset_id, metric_schema)
Save the schema of a single metric for a given dataset.
Save the schema of a single metric for a given dataset. The metric will be given a name based on the label in the schema, replacing any non-alphanumeric with _.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.metric_schema import MetricSchema
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
metric_schema = MetricSchema(
label="Estimated prediction median",
column="estimated_prediction",
default_metric="default_metric_example",
builtin_metric="median",
) # MetricSchema |
# example passing only required values which don't have defaults set
try:
# Save the schema of a single metric for a given dataset.
api_response = api_instance.put_entity_schema_metric(org_id, dataset_id, metric_schema)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->put_entity_schema_metric: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
metric_schema | MetricSchema |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | PutEntitySchemaMetric 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response put_named_metric_schema(org_id, dataset_id, metric_name, metric_schema_fields)
Save the schema of a single named metric for a given dataset.
Save the schema of a single named metric for a given dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.metric_schema_fields import MetricSchemaFields
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
metric_name = "estimated_performance_median" # str |
metric_schema_fields = MetricSchemaFields(
label="Estimated prediction median",
column="estimated_prediction",
builtin_metric="median",
) # MetricSchemaFields |
# example passing only required values which don't have defaults set
try:
# Save the schema of a single named metric for a given dataset.
api_response = api_instance.put_named_metric_schema(org_id, dataset_id, metric_name, metric_schema_fields)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->put_named_metric_schema: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
metric_name | str | ||
metric_schema_fields | MetricSchemaFields |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | PutNamedMetricSchema 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EntitySchema reinfer_entity_schema(org_id, dataset_id, reinfer_entity_schema_request)
Reinfers the entity schema config for a given dataset.
Reinfers the type and discreteness for the columns in a given dataset. Retains additional user information like tags and whether the column is input or output
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.entity_schema import EntitySchema
from whylabs_client.model.reinfer_entity_schema_request import ReinferEntitySchemaRequest
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
reinfer_entity_schema_request = ReinferEntitySchemaRequest(
interval="2024-01-01T00:00:00Z/2024-01-12T00:00:00Z",
) # ReinferEntitySchemaRequest |
# example passing only required values which don't have defaults set
try:
# Reinfers the entity schema config for a given dataset.
api_response = api_instance.reinfer_entity_schema(org_id, dataset_id, reinfer_entity_schema_request)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->reinfer_entity_schema: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
reinfer_entity_schema_request | ReinferEntitySchemaRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ReinferEntitySchema 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelMetadataResponse update_model(org_id, model_id, model_name, time_period)
Update a model's metadata
Update a model's metadata
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.model_metadata_response import ModelMetadataResponse
from whylabs_client.model.model_type import ModelType
from whylabs_client.model.time_period import TimePeriod
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str | The organization ID
model_id = "model-123" # str | The model ID
model_name = "Credit-Score-1" # str | The name of a model
time_period = TimePeriod("P1D") # TimePeriod | The \\[TimePeriod\\] for data aggregation/alerting for a model
model_type = ModelType("CLASSIFICATION") # ModelType | The \\[ModelType\\] of the dataset (optional)
# example passing only required values which don't have defaults set
try:
# Update a model's metadata
api_response = api_instance.update_model(org_id, model_id, model_name, time_period)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->update_model: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update a model's metadata
api_response = api_instance.update_model(org_id, model_id, model_name, time_period, model_type=model_type)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->update_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | The organization ID | |
model_id | str | The model ID | |
model_name | str | The name of a model | |
time_period | TimePeriod | The \[TimePeriod\] for data aggregation/alerting for a model | |
model_type | ModelType | The \[ModelType\] of the dataset | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The \[ModelMetadataResponse\] if operation succeeds | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response update_resource_tag(org_id, dataset_id, resource_tag)
Update a resource tag to a dataset.
Update a resource tag to a dataset.
- Api Key Authentication (ApiKeyAuth):
import time
import whylabs_client
from whylabs_client.api import models_api
from whylabs_client.model.resource_tag import ResourceTag
from whylabs_client.model.response import Response
from pprint import pprint
# Defining the host is optional and defaults to https://api.whylabsapp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
host = "https://api.whylabsapp.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = models_api.ModelsApi(api_client)
org_id = "org-123" # str |
dataset_id = "model-123" # str |
resource_tag = ResourceTag(
key="key_example",
value="value_example",
) # ResourceTag |
# example passing only required values which don't have defaults set
try:
# Update a resource tag to a dataset.
api_response = api_instance.update_resource_tag(org_id, dataset_id, resource_tag)
pprint(api_response)
except whylabs_client.ApiException as e:
print("Exception when calling ModelsApi->update_resource_tag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
org_id | str | ||
dataset_id | str | ||
resource_tag | ResourceTag |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | UpdateResourceTag 200 response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]