Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ca5a920
feat: begin storing category maps with algorithms in the DB
mihow Nov 26, 2024
22851e6
feat: begin saving all logits and scores from all predictions
mihow Nov 26, 2024
c635f26
fix: complete rename of softmax_scores field (now any calibrated score)
mihow Nov 27, 2024
6e86709
feat: admin sections for Classifications and Category Maps
mihow Nov 28, 2024
a665c45
fix: save simple labels along with category map data
mihow Nov 28, 2024
0eec366
feat: use function to generate fake classifications
mihow Nov 28, 2024
5d047c6
feat: update schema in example ML backend. comments
mihow Nov 28, 2024
836880f
fix: formatting
mihow Nov 28, 2024
6c8b550
fix: remove bad admin filter
mihow Nov 28, 2024
85dec99
fix: update formatting (line-lengths)
mihow Dec 5, 2024
7da5159
fix: reset line-length to existing project value
mihow Dec 5, 2024
2b0f039
feat: API views for algorithm category maps
mihow Dec 5, 2024
8598d77
feat: define schema for Algorithm & AlgorithmCategoryMap in the ML ba…
mihow Dec 5, 2024
c94ecd1
feat: continue writing schema for algorithms
mihow Dec 5, 2024
885ca0d
feat: update image fetching utils based on latest AMI data companion
mihow Dec 5, 2024
0c6115e
feat: bring schemas related to the ML backend responses in sync
mihow Dec 5, 2024
4f813b4
fix: fix import
mihow Dec 5, 2024
4c18630
feat: update schema for algorithms
mihow Dec 5, 2024
9bc9072
feat: update tests for processing pipeline responses
mihow Dec 5, 2024
e1c2d8a
chore: update formatting (line-lengths)
mihow Dec 5, 2024
11225df
fix: use only the key field for keeping algorithms unique
mihow Dec 5, 2024
18ec522
feat: update logging when saving pipeline results
mihow Dec 7, 2024
a78f88d
feat: features from live ml backend schema
mihow Dec 7, 2024
10689c1
feat: improve matching existing algorithms & labels to incoming data
mihow Dec 7, 2024
ac0ec0b
chore: reduce number of test images
mihow Dec 12, 2024
92813e0
fix: attempt to fix reprocessing when there is a new algorithm
mihow Dec 12, 2024
ce96845
chore: refactor pipeline results into multiple functions
mihow Dec 17, 2024
cb9bb7e
feat: support to add logits & scores to existing classifications
mihow Dec 17, 2024
305b338
fix: logging and comments
mihow Dec 17, 2024
2648eb5
fix: improve job status updates and failure handling
mihow Dec 17, 2024
1f9c07d
fix: allow specifying job type on create, update tests
mihow Dec 18, 2024
981bfd8
feat: move job logs to their own field to not mess with progress updates
mihow Dec 18, 2024
32a7c68
feat: basic tests for category maps
mihow Dec 19, 2024
288e529
feat: improve bulk saving & logging for pipeline results
mihow Dec 19, 2024
1de3d93
feat: update occurrence determinations when saving results
mihow Dec 19, 2024
5c04c8f
feat: ensure determination is not considering intermediate classifica…
mihow Dec 19, 2024
a0a5c14
feat: allow agreeing with any prediction/identification
mihow Dec 19, 2024
bd019c7
fix: updates to detection occurrences
mihow Dec 19, 2024
eb03238
fix: update detections with occurrences
mihow Dec 19, 2024
b7a2e4d
fix: fallback to non-terminal classifications if need be (non-moth)
mihow Dec 19, 2024
6215038
fix: creating occurrences in bulk
mihow Dec 19, 2024
24f33f0
feat: kill long queries during development
mihow Dec 20, 2024
f037778
feat: add test for mapping taxa from category maps
mihow Dec 20, 2024
49f6771
feat: add more classification and detection details to API responses
mihow Dec 20, 2024
36f6134
feat: optionally return pipeline results
mihow Dec 20, 2024
12dbcc4
fix: associate category map with each classification in addition to algo
mihow Dec 20, 2024
35d6b7a
chore: more logging when saving results
mihow Dec 20, 2024
fb5af5c
feat: allow filtering captures by project
mihow Dec 20, 2024
0f83a19
fix: update formatting
mihow Dec 20, 2024
a79f177
feat: make the classification list view more lightweight
mihow Dec 20, 2024
eac3210
feat: use redis for primary cache locally
mihow Dec 20, 2024
e8eb341
feat: support for retying failed requests
mihow Dec 20, 2024
fcf2f30
Merge branch 'main' of github.com:RolnickLab/antenna into feat/more-p…
mihow Jan 16, 2025
7a313a8
Merge branch 'main' into feat/more-predictions-data
mihow Jan 17, 2025
2522063
Merge branch 'main' into feat/more-predictions-data
mihow Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions ami/jobs/migrations/0013_add_job_logs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Generated by Django 4.2.10 on 2024-12-17 20:01

import django_pydantic_field.fields
from django.db import migrations

import ami.jobs.models


def migrate_logs_forward(apps, schema_editor):
"""Move logs from Job.progress to Job.logs"""
Job = apps.get_model("jobs", "Job")
jobs_to_update = []
for job in Job.objects.filter(progress__isnull=False):
if job.progress.logs or job.progress.errors:
# Move logs from progress to the new logs field
job.logs.stdout = job.progress.logs
job.logs.stderr = job.progress.errors
jobs_to_update.append(job)
# Update all jobs in a single query
Job.objects.bulk_update(jobs_to_update, ["logs"])


def migrate_logs_backward(apps, schema_editor):
"""Move logs from Job.logs back to Job.progress"""
Job = apps.get_model("jobs", "Job")
jobs_to_update = []
for job in Job.objects.filter(logs__isnull=False):
# Move logs back to progress
job.progress.logs = job.logs.stdout
job.progress.errors = job.logs.stderr
jobs_to_update.append(job)
# Update all jobs in a single query
Job.objects.bulk_update(jobs_to_update, ["progress"])


class Migration(migrations.Migration):
dependencies = [
("jobs", "0012_alter_job_limit"),
]

operations = [
migrations.AddField(
model_name="job",
name="logs",
field=django_pydantic_field.fields.PydanticSchemaField(
config=None, default={"stderr": [], "stdout": []}, schema=ami.jobs.models.JobLogs
),
),
migrations.RunPython(
migrate_logs_forward,
migrate_logs_backward,
),
]
23 changes: 23 additions & 0 deletions ami/jobs/migrations/0014_alter_job_progress.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.10 on 2024-12-17 20:13

import ami.jobs.models
from django.db import migrations
import django_pydantic_field.fields


class Migration(migrations.Migration):
dependencies = [
("jobs", "0013_add_job_logs"),
]

operations = [
migrations.AlterField(
model_name="job",
name="progress",
field=django_pydantic_field.fields.PydanticSchemaField(
config=None,
default={"errors": [], "logs": [], "stages": [], "summary": {"progress": 0.0, "status": "CREATED"}},
schema=ami.jobs.models.JobProgress,
),
),
]
Loading
Loading