-
Notifications
You must be signed in to change notification settings - Fork 1.2k
4380 - Inference logging to blob storage #4473
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
base: master
Are you sure you want to change the base?
4380 - Inference logging to blob storage #4473
Conversation
bfc0b10
to
013211f
Compare
/rerun-workflow test-llm |
bd59e67
to
b15dca7
Compare
@cjohannsen-cloudera Can you help update the documentation as well ?https://github.com/kserve/website/blob/main/docs/modelserving/logger/logger.md |
@sivanantha321 yes I can do that |
fc89c0a
to
2a25e55
Compare
2a25e55
to
c03cfdc
Compare
/rerun-workflow test |
e7a8f44
to
e902eb4
Compare
498eb54
to
4d2450b
Compare
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Co-authored-by: Sivanantham <90966311+sivanantha321@users.noreply.github.com> Signed-off-by: cjohannsen-cloudera <cjohannsen@cloudera.com>
Co-authored-by: Sivanantham <90966311+sivanantha321@users.noreply.github.com> Signed-off-by: cjohannsen-cloudera <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
Signed-off-by: cory-johannsen <cjohannsen@cloudera.com>
4d2450b
to
7082cbd
Compare
kfslogger.StartDispatcher(workers, logger) | ||
var store kfslogger.Store | ||
if kfslogger.GetStorageStrategy(*logUrl) != kfslogger.HttpStorage { | ||
if logStoreFormat != nil && *logStoreFormat != "" && logStorePath != nil && *logStorePath != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can have a default for logFromat ?
storageSecretName = secretName | ||
|
||
// if the secret name is provided use it | ||
if secretName != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a test case for this ?
@@ -46,6 +48,7 @@ const ( | |||
LoggerArgumentTlsSkipVerify = "--logger-tls-skip-verify" | |||
LoggerArgumentMetadataHeaders = "--metadata-headers" | |||
LoggerArgumentMetadataAnnotations = "--metadata-annotations" | |||
LoggerDefaultServiceAccountName = "logger-sa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this default name configurable ?
@@ -56,16 +59,22 @@ type AgentConfig struct { | |||
MemoryLimit string `json:"memoryLimit"` | |||
} | |||
|
|||
type LoggerStorageSpec struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type is already defined in the pkg/apis/serving/v1beta1/inference_service.go. We can reuse that.
What this PR does / why we need it:
This adds support for storing model request and response logs to S3. The implementation is generic enough that adding support for GCS et al will be straightforward, I hope.
Storage is defined using the StorageSpec. The existing
v1beta1.StorageSpec
has been refactored to extract a base struct.The existing
StorageSpec
is nowModelStorageSpec
and adds theSchemaPath
This is a pure refactor.
The LoggerConfig now contains a StorageSpec that defines the logger storage output location and a service account name used to fetch credentials.
Three new command line parameters have been added to the agent to allow the storage configuration to be passed in when injecting the agent.
By default the logger service account is undefined, and the logger storage feature is disabled.
If the service account name is defined, the logger will attempt to look for a Service Account with the matching name and mount the secrets it contains. When the agent is launched the secrets are available in the environment.
When an inference occurs the S3 client is constructed and the request and response are stored to the blob store path specified above. The agent uses the existing client defined for the model downloader to simplify integration and configuration, enhanced to allow for uploads.
Which issue(s) this PR fixes
Fixes #4380
Type of changes
Feature/Issue validation/testing:
[x] Added additional test to logger/handler_test.go
[x] Added new test, logger/store_test.go
[x] Added new agent command argument to agent_injector_test.go
To test locally create a secret in the
default
namespaceCreate a service account for the secret:
To test the feature, deploy a model with inference logging:
Send a prediction to the endpoint and the request and response are stored as json in the blob storage location
[YOUR_BUCKET]/logger/
Documentation updated in PR 481
Release note:
Re-running failed tests
/rerun-all
- rerun all failed workflows./rerun-workflow <workflow name>
- rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.