-
Notifications
You must be signed in to change notification settings - Fork 149
development approach b benchmark #672
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
Changes from all commits
fd57583
91fd496
4927d9a
73a382c
684ebfa
fe000b1
d9f0499
a3ab05a
2f24ff8
559030d
2a6cd2b
ce908a5
2dd9e3a
157e01a
86ade1b
ee498da
ce13416
cb25b47
13806d2
2378c26
57d3d3b
c6eebea
9d02116
9b22dbd
1cca27d
2e2dee6
a74f5a5
5b67c73
bbcfa76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Run Pipeline Benchmark | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, development ] | ||
|
|
||
| jobs: | ||
| benchmark: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| services: | ||
| ollama: | ||
| image: ollama/ollama:latest | ||
| ports: | ||
| - 11434:11434 | ||
|
|
||
| steps: | ||
| - name: Checkout PR Branch | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| cache: 'pip' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install -r requirements.txt | ||
| pip install pytest | ||
|
|
||
| - name: Run PR Branch Benchmark | ||
| run: | | ||
| pytest benchmark/test_benchmark.py -v | ||
| mv benchmark/benchmark_report.json branch_report.json | ||
|
|
||
| - name: Checkout Target Branch | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.base_ref }} | ||
| clean: false | ||
|
|
||
| - name: Run Target Branch Benchmark | ||
| run: | | ||
| pytest benchmark/test_benchmark.py -v | ||
| mv benchmark/benchmark_report.json target_report.json | ||
|
|
||
| - name: Compare Benchmarks | ||
| id: compare | ||
| run: | | ||
| python benchmark/compare_benchmarks.py branch_report.json target_report.json > comparison.md | ||
| cat comparison.md | ||
|
|
||
| - name: Comment PR with results | ||
| uses: thollander/actions-comment-pull-request@v3 | ||
| with: | ||
| filePath: comparison.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| from . import templates, forms | ||
| from . import forms, templates | ||
|
|
||
| __all__ = ["templates", "forms"] | ||
| __all__ = ["forms", "templates"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| import uuid as uuid_mod | ||
| from uuid import UUID, uuid4 | ||
| from datetime import date, datetime, timezone | ||
| from uuid import UUID, uuid4 | ||
|
|
||
| from sqlalchemy import Column, JSON | ||
| from sqlmodel import SQLModel, Field | ||
| from sqlalchemy import JSON, Column | ||
| from sqlmodel import Field, SQLModel | ||
| from sqlmodel.sql.sqltypes import AutoString | ||
|
|
||
| from app.api.schemas.enums import ( | ||
|
|
@@ -32,6 +32,7 @@ class FormSubmission(SQLModel, table=True): | |
| template_id: int = Field(foreign_key="template.id") | ||
| input_id: UUID | None = Field(default=None, foreign_key="inputs.input_id") | ||
| input_text: str | ||
| extracted_fields: dict | None = Field(default=None, sa_column=Column(JSON)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new ORM column is not created by migration 003, which only adds Useful? React with 👍 / 👎. |
||
| output_pdf_path: str | ||
| created_at: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import openmeteo_requests | ||
|
|
||
| import pandas as pd | ||
| import requests_cache | ||
| from retry_requests import retry | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checked Docker worker starts from
app.core.celery:celery_app, but this module no longer imports or includesapp.tasks.fill,app.tasks.purge, orapp.tasks.transcribe. Consequently the separate worker process does not register those tasks and will reject queued form-fill and transcription messages as unregistered; restore the task includes/imports (and the existing app configuration) when constructing the Celery application.Useful? React with 👍 / 👎.