Skip to content

Commit

Permalink
fix: bug when ops are not visible
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyashankar committed Dec 14, 2024
1 parent 5ac21a9 commit 6025a33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion website/src/app/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export function generatePipelineConfig(
: processSchemaItem(item.subType as SchemaItem);
return `list[${subType}]`;
} else if (item.type === "dict") {
console.log(item);
if (!item.subType) {
throw new Error(
`Dict/Object type must specify its structure for field: ${item.key}`
Expand Down Expand Up @@ -234,6 +233,8 @@ export function generatePipelineConfig(

const yamlString = yaml.dump(pipelineConfig);

console.log(yamlString);

return {
yamlString,
inputPath,
Expand Down
9 changes: 6 additions & 3 deletions website/src/components/PipelineGui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,13 @@ const PipelineGUI: React.FC = () => {

const onRunAll = useCallback(
async (clear_intermediate: boolean) => {
const lastOpIndex = operations.length - 1;
if (lastOpIndex < 0) return;
// Find the last visible operation
const lastVisibleOpIndex = operations.findLastIndex(
(op) => op.visibility !== false
);
if (lastVisibleOpIndex < 0) return;

const lastOperation = operations[lastOpIndex];
const lastOperation = operations[lastVisibleOpIndex];
setOptimizerProgress(null);
setIsLoadingOutputs(true);
setNumOpRun((prevNum) => {
Expand Down

0 comments on commit 6025a33

Please sign in to comment.