Navigating into Chios
-
Go into VSCode. Click the lower-left corner, where you see the > and < going into each other.
-
Several options should now appear under the search bar. Select “Connect to host…” or “Connect Current Window to Host…” The former will open a new VSCode window and connect to Chios in that, while the latter will connect to Chios within the current VSCode window.
-
Select “chios.cs.vt.edu”
-
If you selected “Connect to host…”, a new VSCode window will appear. If you selected “Connect Current Window to Host…”, the window will refresh. Either way, the search bar will tell you to enter the password for [your PID]@chios.cs.vt.edu. Enter your password for your RLogin account.
Navigating into Repository
-
Navigate into Chios.
-
On your left sidebar, click the button that says “Open Folder”
-
Below the search bar, a bunch of options will appear. Select “burgs”, then click the button that says OK.
-
You should now see all of the files appear in the explorer, on the left side of your screen.
Running the agent
-
Navigate into BURGS, then run “cd OptimizerAgent” into the terminal to get into the Optimizer Agent folder.
-
In the terminal, type in “streamlit run agent.py” and press enter. The terminal should now display “You can now view your Streamlit app in your browser” and a pop-up should appear in the lower right corner with a button that says “Open in Browser.” Click that button to open the program in your browser.
-
A new tab should open in your browser. It will take a minute to load, but you should now see the agent frontend, and be able to input code.
-
To kill the process, go back into your terminal and do Ctrl+C.
Using to Agent
-
Input your code into the textbox. You can also change the model used to optimize the code, and the number of different optimizations generated (you can generate 1, 2, 3, 4, or 5). Adjust the settings to your liking and click the button saying “Improve Code”. Note that (a) MARCO only optimizes Python code, (b) when you select a model, that model will be used for all optimizations, (c) currently only OpenAI models are available.
-
The agent will first print out your unoptimized code for comparison purposes.
-
The agent will generate the optimization techniques and use them to optimize your code. It will then print out each optimized version of your code, along with a short description of each optimization technique.