query

How can I query for a monitor's status using GraphQL?

You can query for a monitor's status using GraphQL by including the "status" field in your query.


llm

Context information is below.
---------------------
Here I'm using a monitor that is triggered from the previous example. You can find a monitor by following the example or by using the UI and grabbing the monitor id from the URL. (`.../monitors/:`**`monitor_id`**).

{% tabs %}
{% tab title="Request" %}
```graphql
query {
  node(id: "monitor_id"){
    ... on Monitor {
      name
      monitorCategory
      threshold
      currentMetricValue
      operator
      status
    }
  }
}
```
{% endtab %}

{% tab title="Response" %}
```json
{
  "data": {
    "node": {
      "name": "Model Drift for delinq_2yrs",
      "monitorCategory": "drift",
      "threshold": 0.000164044030786001,
      "currentMetricValue": "0.00049",
      "operator": "greaterThan",
      "status": "triggered"
    }
  }
}
```
{% endtab %}
{% endtabs %}

```graphql
{
  monitor {
    threshold
  }
}
```

GraphQL allows you to specify a response query at the end of a mutation. This conveniently allows you to verify your mutation in the same call.
---------------------
Given the context information and not prior knowledge, answer the query.
Query: How can I query for a monitor's status using GraphQL?
Answer:

You can query for a monitor's status using GraphQL by including the "status" field in your query.

system: You are an expert Q&A system that is trusted around the world.
Always answer the query using the provided context information, and not prior knowledge.
Some rules to follow:
1. Never directly reference the given context in your answer.
2. Avoid statements like 'Based on the context, ...' or 'The context information ...' or anything along those lines.
user: Context information is below.
---------------------
{context_str}
---------------------
Given the context information and not prior knowledge, answer the query.
Query: {query_str}
Answer:
assistant:


retrieve

Here I'm using a monitor that is triggered from the previous example. You can find a monitor by following the example or by using the UI and grabbing the monitor id from the URL. (`.../monitors/:`**`monitor_id`**).

{% tabs %}
{% tab title="Request" %}
```graphql
query {
  node(id: "monitor_id"){
    ... on Monitor {
      name
      monitorCategory
      threshold
      currentMetricValue
      operator
      status
    }
  }
}
```
{% endtab %}

{% tab title="Response" %}
```json
{
  "data": {
    "node": {
      "name": "Model Drift for delinq_2yrs",
      "monitorCategory": "drift",
      "threshold": 0.000164044030786001,
      "currentMetricValue": "0.00049",
      "operator": "greaterThan",
      "status": "triggered"
    }
  }
}
```
{% endtab %}
{% endtabs %}

```graphql
{
  monitor {
    threshold
  }
}
```

GraphQL allows you to specify a response query at the end of a mutation. This conveniently allows you to verify your mutation in the same call.


embedding

How can I query for a monitor's status using GraphQL?


query

To delete a model, you would need to access the model management or administration section of the platform or system you are using. Look for options or settings related to model management, and within that section, you should find the option to delete a model. The specific steps may vary depending on the platform or system you are using.


llm

Context information is below.
---------------------
Navigate to the custom metric editor in the top navigation bar of any model. Click on 'Custom Metrics' to uncover the editor.

> See below for more details, or click to navigate directly to a definition.
>
> 1. Model Name
> 2. Model Version
> 3. Model Environments
> 4. Model Type
> 5. Prediction ID
> 6. Timestamp
> 7. Features (Tabular - Structured Data)
> 8. Embedding Features (Unstructured Data)
> 9. Tags
> 10. Feature Importance
---------------------
Given the context information and not prior knowledge, answer the query.
Query: How do I delete a model?
Answer:

To delete a model, you would need to access the model management or administration section of the platform or system you are using. Look for options or settings related to model management, and within that section, you should find the option to delete a model. The specific steps may vary depending on the platform or system you are using.


retrieve

Navigate to the custom metric editor in the top navigation bar of any model. Click on 'Custom Metrics' to uncover the editor.

> See below for more details, or click to navigate directly to a definition.
>
> 1. Model Name
> 2. Model Version
> 3. Model Environments
> 4. Model Type
> 5. Prediction ID
> 6. Timestamp
> 7. Features (Tabular - Structured Data)
> 8. Embedding Features (Unstructured Data)
> 9. Tags
> 10. Feature Importance


query

How much does an enterprise license of Arize cost?

I'm sorry, but I don't have access to pricing information for Arize. For detailed pricing information, I recommend reaching out to Arize's sales team at contacts@arize.com. They will be able to provide you with the most accurate and up-to-date information regarding the cost of an enterprise license.


llm

Context information is below.
---------------------
We also offer Arize On-Prem, which runs a completely scalable infrastructure within your company's AWS, GCP or Azure account. The environment can be provisioned by us or by your company, using a toolset comprised of Terraform and Kubernetes.

Talk to our sales team for more detailed setup instructions by reaching out to contacts@arize.com

Arize is an open platform that works with your machine learning infrastructure, and can be deployed as SaaS or on-premise.

!Open Platform designed to work across platforms and model frameworks
---------------------
Given the context information and not prior knowledge, answer the query.
Query: How much does an enterprise license of Arize cost?
Answer:

I'm sorry, but I don't have access to pricing information for Arize. For detailed pricing information, I recommend reaching out to Arize's sales team at contacts@arize.com. They will be able to provide you with the most accurate and up-to-date information regarding the cost of an enterprise license.


retrieve

We also offer Arize On-Prem, which runs a completely scalable infrastructure within your company's AWS, GCP or Azure account. The environment can be provisioned by us or by your company, using a toolset comprised of Terraform and Kubernetes.

Talk to our sales team for more detailed setup instructions by reaching out to contacts@arize.com

Arize is an open platform that works with your machine learning infrastructure, and can be deployed as SaaS or on-premise.

!Open Platform designed to work across platforms and model frameworks


embedding

How much does an enterprise license of Arize cost?


query

How do I log a prediction using the python SDK?

To log a prediction using the Python SDK, you can use the `arize.log()` function. You need to provide the necessary parameters such as `prediction_id`, `model_id`, `model_type`, `environment`, `model_version`, `prediction_timestamp`, `features`, `prediction_label`, and `tags`. Additionally, you can also log the actual label by using the `arize.log()` function again and providing the `actual_label` parameter.


llm

Context information is below.
---------------------
schema = Schema(
    prediction_id_column_name="prediction_id", #needs to be the same as above
    actual_label_column_name="actual_label",
    ...
)
```
{% endtab %}

{% tab title="Python Single Record" %}
To log delayed actuals using the Python Single Record SDK, simply match the actual `prediction_id` with its corresponding prediction. From there, Arize will automatically identify the join and match the data together.

```python
#log the features & prediction
response = arize.log(
    prediction_id='plED4eERDCasd9797ca34',
    model_id='sample-model-1',
    model_type=ModelTypes.SCORE_CATEGORICAL,
    environment=Environments.PRODUCTION,
    model_version='v1',
    prediction_timestamp=1618590882,
    features=features,
    prediction_label=('Fraud',.4),
    tags=tags
)

#log the actual
actual_response = arize.log(
    prediction_id='plED4eERDCasd9797ca34',
    model_id='sample-model-1',
    model_type=ModelTypes.SCORE_CATEGORICAL,
    environment=Environments.PRODUCTION,
    actual_label=('Fraud',1),
    tags=tags)
```
{% endtab %}
{% endtabs %}

```python
features = {
    'state': 'ca',
    'pos_approved': True
    }

tags = {
    'zip_code': '12345'
    'age': '25'
    }

response = arize_client.log(
    model_id='sample-model-1',
    model_version='v1',
    model_type=ModelTypes.BINARY_CLASSIFICATION,
    environment=Environments.PRODUCTION,
    features=features,
    tags=tags,
    prediction_score=0.3,
    actual_score=1
)
```

For more information on Python Single Record Logging API Reference, visit here:

{% content-ref url="../api-reference/sdk-reference/python-sdk/arize.log.md" %}
arize.log.md
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
---------------------
Given the context information and not prior knowledge, answer the query.
Query: How do I log a prediction using the python SDK?
Answer:

To log a prediction using the Python SDK, you can use the `arize.log()` function. You need to provide the necessary parameters such as `prediction_id`, `model_id`, `model_type`, `environment`, `model_version`, `prediction_timestamp`, `features`, `prediction_label`, and `tags`. Additionally, you can also log the actual label by using the `arize.log()` function again and providing the `actual_label` parameter.


retrieve

schema = Schema(
    prediction_id_column_name="prediction_id", #needs to be the same as above
    actual_label_column_name="actual_label",
    ...
)
```
{% endtab %}

{% tab title="Python Single Record" %}
To log delayed actuals using the Python Single Record SDK, simply match the actual `prediction_id` with its corresponding prediction. From there, Arize will automatically identify the join and match the data together.

```python
#log the features & prediction
response = arize.log(
    prediction_id='plED4eERDCasd9797ca34',
    model_id='sample-model-1',
    model_type=ModelTypes.SCORE_CATEGORICAL,
    environment=Environments.PRODUCTION,
    model_version='v1',
    prediction_timestamp=1618590882,
    features=features,
    prediction_label=('Fraud',.4),
    tags=tags
)

#log the actual
actual_response = arize.log(
    prediction_id='plED4eERDCasd9797ca34',
    model_id='sample-model-1',
    model_type=ModelTypes.SCORE_CATEGORICAL,
    environment=Environments.PRODUCTION,
    actual_label=('Fraud',1),
    tags=tags)
```
{% endtab %}
{% endtabs %}

```python
features = {
    'state': 'ca',
    'pos_approved': True
    }

tags = {
    'zip_code': '12345'
    'age': '25'
    }

response = arize_client.log(
    model_id='sample-model-1',
    model_version='v1',
    model_type=ModelTypes.BINARY_CLASSIFICATION,
    environment=Environments.PRODUCTION,
    features=features,
    tags=tags,
    prediction_score=0.3,
    actual_score=1
)
```

For more information on Python Single Record Logging API Reference, visit here:

{% content-ref url="../api-reference/sdk-reference/python-sdk/arize.log.md" %}
arize.log.md
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


embedding

How do I log a prediction using the python SDK?