Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document suppression of missing custom_metrics and custom_tags prior to 1.1 #1720

Merged
merged 2 commits into from
Apr 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion doc/source/python/python_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class ModelWithMetrics(object):

Note: prior to Seldon Core 1.1 custom metrics have always been returned to client. From SC 1.1 you can control this behaviour setting `INCLUDE_METRICS_IN_CLIENT_RESPONSE` environmental variable to either `true` or `false`. Despite value of this environmental variable custom metrics will always be exposed to Prometheus.

Prior to Seldon Core 1.1 not implementing custom metrics logs a message at the info level at each predict call. Starting with Seldon Core this is logged at the debug level. To supress this warning implement a metrics function returning an empty list:
ukclivecox marked this conversation as resolved.
Show resolved Hide resolved

```python
def metrics(self):
return []
```

## Returning Tags

Expand All @@ -139,7 +145,7 @@ If we wish to add arbitrary tags to the returned metadata you can provide a `tag
A simple example is shown below:

```python
class ModelWithMetrics(object):
class ModelWithTags(object):

def predict(self,X,features_names):
return X
Expand All @@ -148,6 +154,13 @@ class ModelWithMetrics(object):
return {"system":"production"}
```

Prior to Seldon Core 1.1 not implementing custom tags logs a message at the info level at each predict call. Starting with Seldon Core this is logged at the debug level. To supress this warning implement a tags function returning an empty dictionary:

```python
def metrics(self):
return {}
```

## REST Health Endpoint
If you wish to add a REST health point, you can implement the `health_status` method with signature as shown below:
```python
Expand Down