Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion jobs/broken-site-report-ml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.12
MAINTAINER REPLACE ME <replaceme@mozilla.com>

# https://github.com/mozilla-services/Dockerflow/blob/master/docs/building-container.md
Expand Down
4 changes: 2 additions & 2 deletions jobs/broken-site-report-ml/broken_site_report_ml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def add_classification_results(client, bq_dataset_id, results):
bq_result = {
"report_uuid": uuid,
"label": CLASSIFICATION_LABELS[result["class"]],
"created_at": datetime.datetime.utcnow().isoformat(),
"created_at": datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).isoformat(),
"probability": result["prob"][result["class"]],
}
res.append(bq_result)
Expand Down Expand Up @@ -157,7 +157,7 @@ def save_translations(client, bq_dataset_id, results):
def record_classification_run(client, bq_dataset_id, is_ok, count):
rows_to_insert = [
{
"run_at": datetime.datetime.utcnow().isoformat(),
"run_at": datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).isoformat(),
"is_ok": is_ok,
"report_count": count,
},
Expand Down
12 changes: 6 additions & 6 deletions jobs/broken-site-report-ml/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
click==8.0.4
flake8==3.8.4
google-cloud-bigquery==3.11.4
pytest==6.0.2
pytest-black==0.3.11
pytest-flake8==1.0.6
click==8.3.3
flake8==7.3.0
google-cloud-bigquery==3.41.0
pytest==9.0.3
pytest-black==0.6.0
pytest-flake8==1.3.0