diff --git a/apps/cli/src/index.tsx b/apps/cli/src/index.tsx index 5ba8322..4d3a6e1 100644 --- a/apps/cli/src/index.tsx +++ b/apps/cli/src/index.tsx @@ -36,7 +36,7 @@ const command = program ) .option( "-p, --port ", - "port to run the IPC server on (default: 3000)", + "port to run the IPC server on", (val) => parseInt(val), 3000, ) diff --git a/packages/bumpgen-core/src/index.ts b/packages/bumpgen-core/src/index.ts index 57fc2fb..f40e6c6 100644 --- a/packages/bumpgen-core/src/index.ts +++ b/packages/bumpgen-core/src/index.ts @@ -241,7 +241,7 @@ const bumpgen = ({ const { graphService } = services; return graphService.plan.nodes.nextPending(graph.plan) === undefined; }, - execute: async (graph: BumpgenGraph, temperature: number) => { + execute: async (graph: BumpgenGraph, temperature = 0.2) => { const { llm, graphService, language } = services; const { packageToUpgrade } = args; const planNode = graphService.plan.nodes.nextPending(graph.plan); @@ -453,15 +453,7 @@ const bumpgen = ({ type: "graph.plan.execute" as const, status: "started" as const, }; - const iterationResult = await bumpgen.graph.plan.execute( - graph, - Math.min( - iteration > maxIterations / 2 - ? 0.2 * Math.exp(0.3 * (iteration - maxIterations / 2)) - : 0.2, - 2, - ), - ); + const iterationResult = await bumpgen.graph.plan.execute(graph); if (!iterationResult) { break; } diff --git a/scripts/src/eval.ts b/scripts/src/eval.ts index c9b2910..1ee52b9 100644 --- a/scripts/src/eval.ts +++ b/scripts/src/eval.ts @@ -3,9 +3,10 @@ import { exec } from "child_process"; import { existsSync, readFileSync } from "fs"; import { writeFile } from "fs/promises"; import { program } from "@commander-js/extra-typings"; -import { injectGitService, makeBumpgen } from "@xeol/bumpgen-core"; import { z } from "zod"; +import { injectGitService, makeBumpgen } from "@xeol/bumpgen-core"; + export const PredictionSchema = z.object({ // the name of the model that generated the prediction modelName: z.string(), @@ -129,12 +130,7 @@ program if (errors.length === 0) break; const graph = bumpgen.graph.initialize(errors); - const temperature = Math.min( - iterations > maxIterations / 2 - ? 0.2 * Math.exp(0.15 * (iterations - maxIterations / 2)) - : 0.2, - 1, - ); + console.log( `ITERATION ${iterations} of ${maxIterations} with temperation ${temperature}`, ); @@ -142,10 +138,7 @@ program let iterationResult; do { - iterationResult = await bumpgen.graph.plan.execute( - graph, - temperature, - ); + iterationResult = await bumpgen.graph.plan.execute(graph); if (!iterationResult) break; } while (iterationResult);