Skip to content

Add telemetry#108

Open
LeeSeeQua1 wants to merge 8 commits into
stagefrom
feature/telemetry
Open

Add telemetry#108
LeeSeeQua1 wants to merge 8 commits into
stagefrom
feature/telemetry

Conversation

@LeeSeeQua1

Copy link
Copy Markdown
Collaborator

No description provided.

@LeeSeeQua1 LeeSeeQua1 requested a review from samiaFife June 9, 2026 06:00
Comment thread coolprompt/assistant.py Outdated
Comment on lines +32 to +48
class TelemetryCollector:
"""Helper to aggregate telemetry during a PromptTuner run."""
def __init__(self, method_name: str, task_type: str, target_model):
self.method_name = method_name
self.task_type = task_type
self.target_model = target_model
self.start_time = datetime.now()
self.start_wall_clock = time.time()
self.trajectory = []

def on_iteration_end(self, iteration: int, best_score: float, best_prompt: str) -> None:
stats = self.target_model.get_stats() if hasattr(self.target_model, "get_stats") else {}
stats = stats or {}
self.trajectory.append(IterationSnapshot(
iteration=iteration,
best_score=best_score,
best_prompt_length=len(best_prompt),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Давай вынесем в отдельный файлик (не в ассистанте прописывать)

@LeeSeeQua1

Copy link
Copy Markdown
Collaborator Author

Добавила тесты + прогнала на простом промпте. Прикрепляю пример статистики для reflective
telemetry_run.json
telemetry_run_trajectory.csv

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