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

Unified log format in KServe runtime application #3560

Closed
lizzzcai opened this issue Mar 30, 2024 · 2 comments · Fixed by #3577
Closed

Unified log format in KServe runtime application #3560

lizzzcai opened this issue Mar 30, 2024 · 2 comments · Fixed by #3577

Comments

@lizzzcai
Copy link
Member

lizzzcai commented Mar 30, 2024

/kind feature

Describe the solution you'd like

Currently, KServe application logs are not unified.

  1. some places use import logging and some places use from kserve.logging import logger.
  2. there is default log config defined but not applied by default for the application logger.

example format for huggingface server:

python -m huggingfaceserver --model_id=bert-base-uncased --model_name=bert

INFO:kserve:successfully loaded tokenizer for task: 5
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'bert.pooler.dense.bias', 'cls.seq_relationship.bias', 'bert.pooler.dense.weight']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
INFO:kserve:successfully loaded huggingface model from path bert-base-uncased
INFO:kserve:Registering model: model
INFO:kserve:Setting max asyncio worker threads as 16
INFO:kserve:Starting uvicorn with 1 workers
2024-01-08 06:32:08.801 uvicorn.error INFO:     Started server process [75012]
2024-01-08 06:32:08.801 uvicorn.error INFO:     Waiting for application startup.
2024-01-08 06:32:08.804 75012 kserve INFO [start():62] Starting gRPC server on [::]:8081
2024-01-08 06:32:08.804 uvicorn.error INFO:     Application startup complete.
2024-01-08 06:32:08.805 uvicorn.error INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

I would expect:

  1. KServe application logs have default format
  2. Storage initializer logs have default format
  3. [optional] The user can overwrite the default format if necessary.

Information like timestamp will be helpful to know how long it take for model being downloaded in storage initializer and how long it take to load the model.

Anything else you would like to add:

My naive approach is to add logging.config.dictConfig(KSERVE_LOG_CONFIG) in kserve.logging and use kserve.logging import logger.
Concern on whether it will overwrite the user's application log format mentioned here.

Links to the design documents:
[Optional, start with the short-form RFC template to outline your ideas and get early feedback.]
[Required, use the longer-form design doc template to specify and discuss your design in more detail]

@yuzisun
Copy link
Member

yuzisun commented Mar 30, 2024

Agreed on this! @sivanantha321 Can you help on this issue?

@sivanantha321
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants