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

Add infra to push performance metric to remote performance tracker #1998

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mfuntowicz
Copy link
Member

This PR introduces a new subpackage optimum.tools.records which aims at providing the bare-minimum infrastructure required to push performance metrics to our internal tracking system

  • Pythonic API RFC
  • CLI interface WIP

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@mfuntowicz
Copy link
Member Author

mfuntowicz commented Aug 27, 2024

Example usage:

from optimum.tools.records import AutoPerformanceTracker, PerformanceRecord

if __name__ == '__main__':

    tracker = AutoPerformanceTracker.from_uri(
        "es+aws://benchmarks-kb3me[..]q7deny.us-east-1.es.amazonaws.com"
    )

    record = PerformanceRecord.latency(
        metric="TIME_TO_FIRST_TOKEN",
        value=123.4,
        meta={
            "commit_id": "saflsfkja3115",
            "model_id": "meta-llama/Meta-Llama-3.1-8B-Instruct",
            "dtype": "float16",
            "tgi_version": "v2.1.1",
            "cuda_version": "12.4.1"
        }
    )

    tracker.push("ci_tgi_performances_tracker", record)

@mfuntowicz
Copy link
Member Author

Tentative CLI interface:

optimum benchmark push -m TIME_TO_FIRST_TOKEN -k latency -v 123.4 -t <float(timestamp)> --meta commit_id=saflsfkja3115 --meta model_id=meta-llama/Meta-Llama-3.1-8B-Instruct --meta dtype=float16 [...] es+aws://benchmarks-k[...]deny.us-east-1.es.amazonaws.com

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