Skip to content

Commit

Permalink
Ingest rank score to Arize (#552)
Browse files Browse the repository at this point in the history
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. Run unit tests and ensure that they are passing
2. If your change introduces any API changes, make sure to update the
e2e tests
3. Make sure documentation is updated for your PR!

-->
# Description
<!-- Briefly describe the motivation for the change. Please include
illustrations where appropriate. -->
Ranking score is currently not ingested to Arize, despite being present
in the dataframe.

# Modifications
<!-- Summarize the key code changes. -->
Add ranking score to the Arize Schema

# Tests
<!-- Besides the existing / updated automated tests, what specific
scenarios should be tested? Consider the backward compatibility of the
changes, whether corner cases are covered, etc. Please describe the
tests and check the ones that have been completed. Eg:
- [x] Deploying new and existing standard models
- [ ] Deploying PyFunc models
-->

# Checklist
- [ ] Added PR label
- [ ] Added unit test, integration, and/or e2e tests
- [ ] Tested locally
- [ ] Updated documentation
- [ ] Update Swagger spec if the PR introduce API changes
- [ ] Regenerated Golang and Python client if the PR introduces API
changes

# Release Notes
<!--
Does this PR introduce a user-facing change?
If no, just write "NONE" in the release-note block below.
If yes, a release note is required. Enter your extended release note in
the block below.
If the PR requires additional action from users switching to the new
release, include the string "action required".

For more information about release notes, see kubernetes' guide here:
http://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note

```
  • Loading branch information
khorshuheng authored Mar 19, 2024
1 parent 444f9eb commit 1f308f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/observation-publisher/publisher/observation_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def _to_arize_schema(self) -> Tuple[ArizeModelType, ArizeSchema]:
model_type = ArizeModelType.REGRESSION
elif isinstance(prediction_output, RankingOutput):
schema_attributes = self._common_arize_schema_attributes() | dict(
prediction_score_column_name=prediction_output.rank_score_column,
rank_column_name=prediction_output.rank_column,
prediction_group_id_column_name=self._inference_schema.session_id_column,
)
Expand Down

0 comments on commit 1f308f5

Please sign in to comment.