Skip to content

Commit

Permalink
Merge pull request #140 from ucbepic/fixcar
Browse files Browse the repository at this point in the history
fix: clear and run button should also bypass cache
  • Loading branch information
shreyashankar authored Nov 1, 2024
2 parents 3bd127d + edd8e9a commit 8fb2123
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions docetl/operations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ def _call_llm_with_cache(
+ messages,
)


return response

def parse_llm_response(
Expand Down
7 changes: 6 additions & 1 deletion website/src/app/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export function generatePipelineConfig(
operation_id: string,
name: string,
sample_size: number | null,
optimize: boolean = false
optimize: boolean = false,
clear_intermediate: boolean = false
) {
const homeDir = os.homedir();

Expand Down Expand Up @@ -42,6 +43,10 @@ export function generatePipelineConfig(
newOp.optimize = true;
}

if (clear_intermediate) {
newOp.bypass_cache = true;
}

delete newOp.runIndex;
delete newOp.otherKwargs;
delete newOp.id;
Expand Down
4 changes: 3 additions & 1 deletion website/src/app/api/writePipelineConfig/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export async function POST(request: Request) {
name,
sample_size,
optimize = false,
clear_intermediate = false,
} = await request.json();

if (!name) {
Expand All @@ -37,7 +38,8 @@ export async function POST(request: Request) {
operation_id,
name,
sample_size,
optimize
optimize,
clear_intermediate
);

console.log(yamlString);
Expand Down
1 change: 1 addition & 0 deletions website/src/components/PipelineGui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ const PipelineGUI: React.FC = () => {
operation_id: lastOperation.id,
name: pipelineName,
sample_size: sampleSize,
clear_intermediate: clear_intermediate,
}),
});

Expand Down

0 comments on commit 8fb2123

Please sign in to comment.