Skip to content

speed up script for regen metric signatures#134

Open
katstankiewicz wants to merge 3 commits into
mainfrom
speed-up-regen-signatures
Open

speed up script for regen metric signatures#134
katstankiewicz wants to merge 3 commits into
mainfrom
speed-up-regen-signatures

Conversation

@katstankiewicz
Copy link
Copy Markdown
Collaborator

Script itself was quick but imported pipecat and all of eva which was slow ~4-5s.
This removes some unused imports and add stubs
Brings down the time to ~1-2s

from importlib.machinery import ModuleSpec
from pathlib import Path
from types import ModuleType
from typing import TypedDict
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I tested the PR on python 3.11 and crashed with PydanticUserError: Please use typing_extensions.TypedDict. Do we want to use "typing_extensions import TypedDict" instead since pyproject.toml supports 3.11 and DeploymentTypedDict is used as a pydantic base. Other than that everything looks good, went from 8s - 3s locally.

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