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

Added top level tempo object that exposes context specific objects #138

Merged
merged 5 commits into from
Jun 15, 2021

Conversation

axsaucedo
Copy link
Contributor

@axsaucedo axsaucedo commented Jun 15, 2021

Ability to expose more friendlier interface to the tempo object which holds insights but also payload information (and could contain metrics, etc).

Example

from tempo.magic import tempo

local_options = RuntimeOptions(**{"insights_options": {"worker_endpoint": DefaultInsightsLocalEndpoint }})

@pipeline(
    name='insights-pipeline',
    uri="s3://tempo/insights-pipeline/resources",
    local_folder=ARTIFACTS_FOLDER,
    runtime_options=runtime_options,
)
class Pipeline:
    
    @predictmethod
    def predict(self, data: np.ndarray, parameters: dict) -> np.ndarray:
        if parameters.get("log"):
            tempo.insights.log_request()
            tempo.insights.log_response()
            tempo.insights.log(parameters)
        return data

@ukclivecox ukclivecox merged commit ef64780 into SeldonIO:master Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants