Skip to content

Commit

Permalink
addressing issues: minikube error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kaganrua committed Aug 19, 2024
1 parent 648aff3 commit 60e313e
Show file tree
Hide file tree
Showing 10 changed files with 1,773 additions and 1,740 deletions.
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"BucketName":"zetaforge",
"Database":"./zetaforge.db",
"SetupVersion":"1",
"KubeContext": "docker",
"KubeContext": "zetaforge",
"Local": {
"BucketPort": 8333,
"Driver": "docker-desktop"
"Driver": "minikube"
},

"Cloud": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { Configuration, OpenAIApi } = require("openai");

import { Configuration, OpenAIApi } from "openai";
const openaiSystemContent = `You are an assistant that generates python code and returns it in a way that must follow the template below.
You absolutely need to give a python code section without abbreviation that follows the template. Do not put code lines at the root, but give only the functions and imports.
Expand Down Expand Up @@ -37,7 +36,7 @@ function extractPythonCode(response) {
return processedCodeBlocks.join("\n\n");
}

async function computeAgent(
export async function computeAgent(
userPrompt,
modelVersion,
conversationHistory,
Expand Down Expand Up @@ -74,4 +73,4 @@ async function computeAgent(
return { response: code, model: modelVersion };
}

module.exports = { computeAgent };

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { Configuration, OpenAIApi } = require("openai");

import { Configuration, OpenAIApi } from "openai";
const openaiSystemContent = `You are an assistant that generates python code and returns it in a way that must follow the template below. Your goal is to generate a view.html file that satisfy the user requirement.
Most importantly, you must rely on the prompt to generate the html_template file that satisfy the user request. The html should contain everything to display in a browser and must rely on CDN or skypack when needed.
You absolutely need to give a python code section without abbreviation that follows the template. Do not put code lines at the root, but give only the functions and imports.
Expand Down Expand Up @@ -59,7 +58,7 @@ function extractPythonCode(response) {
return processedCodeBlocks.join("\n\n");
}

async function computeViewAgent(
export async function computeViewAgent(
userPrompt,
modelVersion,
conversationHistory,
Expand Down Expand Up @@ -96,4 +95,3 @@ async function computeViewAgent(
return { response: code, model: modelVersion };
}

module.exports = { computeViewAgent };
3 changes: 1 addition & 2 deletions frontend/macPacker.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// import { readFileSync, writeFileSync, copyFileSync } from 'fs';
// import path from 'path'

exports.default = async function (context) {
console.log(`\n- [INFO] building for ${context.electronPlatformName} \n`);
if (context.electronPlatformName !== "darwin") {
Expand Down
3,475 changes: 1,758 additions & 1,717 deletions frontend/package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@uiw/codemirror-theme-github": "^4.21.25",
"acorn": "^8.12.1",
"acorn-walk": "^8.3.3",
"app-root-dir": "1.0.2",
"electron-trpc": "^0.5.2",
"electron-updater": "^6.1.1",
"express": "^4.18.2",
Expand Down
3 changes: 1 addition & 2 deletions frontend/resources/compileComputation.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {parser} from '@lezer/python';
import { TreeCursor } from '@lezer/common';
import fs from 'fs'
import { get } from 'app-root-dir';




Expand Down
3 changes: 2 additions & 1 deletion frontend/resources/runTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export async function runTestContainer(blockDir, blockKey) {
try{
await runCommand(command, args, logFile);
} catch(error) {

console.log(`Command '${command}' failed with error`)

}
}
}
Expand Down
8 changes: 3 additions & 5 deletions frontend/server/express.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import path from "path";
import sha256 from "sha256";
import getMAC from "getmac";
import { BLOCK_SPECS_FILE_NAME } from "../src/utils/constants";
import { computeAgent } from "../agents/gpt-4_python_compute/generate/computations.cjs";
import { computeViewAgent } from "../agents/gpt-4_python_view/generate/computations.cjs";
import { computeAgent } from "../agents/gpt-4_python_compute/generate/computations.mjs";
import { computeViewAgent } from "../agents/gpt-4_python_view/generate/computations.mjs";
let anvilProcess = null;

function gracefullyStopAnvil() {
Expand Down Expand Up @@ -358,11 +358,11 @@ function startExpressServer() {
.includes("failed to get client config;") ||
data.toString().toLowerCase().includes("failed to install argo;")
) {
console.log("AM I THROWING ERROR?")
reject(new Error(`Kubeservices not found: ${data.toString()}`));
}
});

anvilProcess.on("close", (code) => {});
});

const runAnvilPromise = Promise.race([anvilTimeoutPromise, runAnvil]);
Expand Down Expand Up @@ -458,7 +458,6 @@ function startExpressServer() {
if (
data.toString().includes("[GIN-debug] Listening and serving HTTP on")
) {
console.log("ANVIL RUN SUCCESFULLY");
resolve();
}
});
Expand All @@ -476,7 +475,6 @@ function startExpressServer() {
.includes("failed to get client config;") ||
data.toString().toLowerCase().includes("failed to install argo;")
) {
console.log("I AM REJECTING NOWWWWWW");
reject(new Error(`Kubeservices not found: ${data.toString()}`));
}
});
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/ui/RunPipelineButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ import { ping } from "@/client/anvil";
export default function RunPipelineButton({ children, action, disabled }) {
const [editor] = useAtom(drawflowEditorAtom);
const [pipeline] = useImmerAtom(pipelineAtom);
const [workspace, setWorkspace] = useImmerAtom(workspaceAtom);
const [_, setWorkspace] = useImmerAtom(workspaceAtom);
const [validationErrorMsg, setValidationErrorMsg] = useState([]);
const [isOpen, setIsOpen] = useState(false);
const [mixpanelService] = useAtom(mixpanelAtom);
const [configuration] = useAtom(activeConfigurationAtom);
const [disable, setDisable] = useState(false);

const executePipeline = trpc.executePipeline.useMutation();
const queryClient = useQueryClient();
Expand Down

0 comments on commit 60e313e

Please sign in to comment.