Update model retraining and reporting functionality - Changed the GITHUB_BRANCH value in values.yaml to reflect the latest adjustments for retraining the courier. - Enhanced the Gates class with a new method `format_retrain_report` to format retraining report data according to storage policies. - Refactored the MLFlow class to improve error handling during model retraining and return structured output. - Updated the model_repository to utilize the latest MLFlow API for retrieving model versions and improved logging. - Modified the minimal_retrain workflow to conditionally update the production model based on retraining success.
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: delete-old-rows
|
|
namespace: sientia
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: delete-old-rows
|
|
image: docker.io/bitnami/postgresql:16.2.0-debian-12-r10
|
|
env:
|
|
- name: PGPASSWORD
|
|
value: "asidhsd@!#!@@!ASD!@#!ASDQ@#!FSDTRYJG#@@$#@%"
|
|
- name: PGUSER
|
|
value: temporal
|
|
- name: PGHOST
|
|
value: "paradedb-rw.paradedb.svc.cluster.local"
|
|
- name: PGDATABASE
|
|
value: "temporal_visibility"
|
|
command:
|
|
- "sh"
|
|
- "-c"
|
|
- |
|
|
# COMANDO CORRIGIDO - Excluir apenas workflows COMPLETED/FAILED antigos
|
|
# Preserva schedules (que ficam RUNNING) e workflows recentes
|
|
psql -h $PGHOST -U $PGUSER -d $PGDATABASE -c "
|
|
DELETE FROM public.executions_visibility
|
|
WHERE start_time < NOW() - INTERVAL '1 minutes'
|
|
AND status IN (2, 3, 4, 5, 7);"
|
|
|
|
# Comando para executar VACUUM FULL após a exclusão
|
|
psql -h $PGHOST -U $PGUSER -d $PGDATABASE -c "VACUUM FULL public.executions_visibility;"
|
|
envFrom:
|
|
- secretRef:
|
|
name: postgres-credentials
|
|
restartPolicy: Never
|
|
backoffLimit: 0
|
|
ttlSecondsAfterFinished: 3600
|
|
|
|
# kubectl apply -f clean_job.yaml -n sientia
|
|
|
|
# kubectl create secret generic postgres-credentials --from-literal=postgres-password=sientia --from-literal=postgres-username=sientia -n sientia4
|
|
|
|
# drop database temporal; drop database temporal_visibility; create database temporal owner temporal; create database temporal_visibility owner temporal; |