Skip to content

Conversation

@stefannica
Copy link
Contributor

@stefannica stefannica commented May 3, 2022

Describe changes

Implements a zenml served-models logs CLI command that streams the log contents of
model servers through the CLI, for easy access to the back-end logs. The command supports "following" the remote logs, "tailing" the last X lines of logs and also pretty-prints everything in the
logs by default, so the result is an improved version of the remote logs. Large files are also supported through the use of IO buffering, HTTP streaming and Python generators.

Example output:

Screenshot from 2022-05-03 12-42-27

Log streaming now works not only with the Seldon and MLflow model servers, but also with
every local daemon service. The base Service class now specifies this abstract method:

    @abstractmethod
    def get_logs(
        self, follow: bool = False, tail: Optional[int] = None
    ) -> Generator[str, bool, None]:

TODO:

  • support multiple "log sources" for services that are implemented using multiple components, such as Kubernetes deployments
  • add init containers to the list of logs sources that can be retrieved for Seldon Core deployments

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels May 3, 2022
@stefannica stefannica requested a review from AlexejPenner May 3, 2022 09:46
Copy link
Contributor

@schustmi schustmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one tiny type annotation that can be improved (but I had to look for a long time ;)). Looks great otherwise!

Copy link
Contributor

@AlexejPenner AlexejPenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! :)

Copy link
Contributor

@schustmi schustmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stefannica stefannica force-pushed the feature/stream-model-deployer-logs branch from d3b0e57 to dfe6bac Compare May 5, 2022 14:45
@stefannica stefannica merged commit d205e39 into develop May 5, 2022
@stefannica stefannica deleted the feature/stream-model-deployer-logs branch May 5, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal To filter out internal PRs and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants