🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore: reduce default batch size of background migrations (#5838)
Steffen Schmitz271f75aa17b9
diff --git a/worker/src/backgroundMigrations/addGenerationsCostBackfill.ts b/worker/src/backgroundMigrations/addGenerationsCostBackfill.tsindex a119aa697c..180c277f91 100644--- a/worker/src/backgroundMigrations/addGenerationsCostBackfill.ts+++ b/worker/src/backgroundMigrations/addGenerationsCostBackfill.ts@@ -66,7 +66,7 @@ export default class AddGenerationsCostBackfilllet previousTimeout;const maxRowsToProcess = Number(args.maxRowsToProcess ?? Infinity);- const batchSize = Number(args.batchSize ?? 5000);+ const batchSize = Number(args.batchSize ?? 1000);let currentDateCutoff = args.maxDate ?? new Date().toISOString();try {@@ -208,7 +208,7 @@ export default class AddGenerationsCostBackfillasync function main() {const args = parseArgs({options: {- batchSize: { type: "string", short: "b", default: "5000" },+ batchSize: { type: "string", short: "b", default: "1000" },maxRowsToProcess: { type: "string", short: "r", default: "Infinity" },maxDate: {type: "string",diff --git a/worker/src/backgroundMigrations/migrateObservationsFromPostgresToClickhouse.ts b/worker/src/backgroundMigrations/migrateObservationsFromPostgresToClickhouse.tsindex 4506a57688..d14a90082d 100644--- a/worker/src/backgroundMigrations/migrateObservationsFromPostgresToClickhouse.ts+++ b/worker/src/backgroundMigrations/migrateObservationsFromPostgresToClickhouse.ts@@ -104,7 +104,7 @@ export default class MigrateObservationsFromPostgresToClickhouseconst stateSuffix = (args.stateSuffix as string) ?? "";const initialDate = await this.getMaxDate(stateSuffix);const maxRowsToProcess = Number(args.maxRowsToProcess ?? Infinity);- const batchSize = Number(args.batchSize ?? 5000);+ const batchSize = Number(args.batchSize ?? 1000);const maxDate =initialDate ?? new Date((args.maxDate as string) ?? new Date());@@ -190,7 +190,7 @@ export default class MigrateObservationsFromPostgresToClickhouseasync function main() {const args = parseArgs({options: {- batchSize: { type: "string", short: "b", default: "5000" },+ batchSize: { type: "string", short: "b", default: "1000" },maxRowsToProcess: { type: "string", short: "r", default: "Infinity" },maxDate: {type: "string",diff --git a/worker/src/backgroundMigrations/migrateScoresFromPostgresToClickhouse.ts b/worker/src/backgroundMigrations/migrateScoresFromPostgresToClickhouse.tsindex a83d131a69..01a19911d0 100644--- a/worker/src/backgroundMigrations/migrateScoresFromPostgresToClickhouse.ts+++ b/worker/src/backgroundMigrations/migrateScoresFromPostgresToClickhouse.ts@@ -74,7 +74,7 @@ export default class MigrateScoresFromPostgresToClickhouse});const maxRowsToProcess = Number(args.maxRowsToProcess ?? Infinity);- const batchSize = Number(args.batchSize ?? 5000);+ const batchSize = Number(args.batchSize ?? 1000);const maxDate = initialMigrationState.state?.maxDate? new Date(initialMigrationState.state.maxDate): new Date((args.maxDate as string) ?? new Date());@@ -169,7 +169,7 @@ export default class MigrateScoresFromPostgresToClickhouseasync function main() {const args = parseArgs({options: {- batchSize: { type: "string", short: "b", default: "5000" },+ batchSize: { type: "string", short: "b", default: "1000" },maxRowsToProcess: { type: "string", short: "r", default: "Infinity" },maxDate: {type: "string",diff --git a/worker/src/backgroundMigrations/migrateTracesFromPostgresToClickhouse.ts b/worker/src/backgroundMigrations/migrateTracesFromPostgresToClickhouse.tsindex a25dca9c91..69e798a5b3 100644--- a/worker/src/backgroundMigrations/migrateTracesFromPostgresToClickhouse.ts+++ b/worker/src/backgroundMigrations/migrateTracesFromPostgresToClickhouse.ts@@ -74,7 +74,7 @@ export default class MigrateTracesFromPostgresToClickhouse});const maxRowsToProcess = Number(args.maxRowsToProcess ?? Infinity);- const batchSize = Number(args.batchSize ?? 5000);+ const batchSize = Number(args.batchSize ?? 1000);const maxDate = initialMigrationState.state?.maxDate? new Date(initialMigrationState.state.maxDate): new Date((args.maxDate as string) ?? new Date());@@ -169,7 +169,7 @@ export default class MigrateTracesFromPostgresToClickhouseasync function main() {const args = parseArgs({options: {- batchSize: { type: "string", short: "b", default: "5000" },+ batchSize: { type: "string", short: "b", default: "1000" },maxRowsToProcess: { type: "string", short: "r", default: "Infinity" },maxDate: {type: "string",