textgrad icon indicating copy to clipboard operation
textgrad copied to clipboard

Colab Error

Open TechKemon opened this issue 1 year ago • 1 comments

I'm getting this error: This function will run the code returned by GPT-4o. Remove this if you'd like to run the code! Full code sequence:

longest_increasing_subsequence = run_function_in_interpreter(initial_solution)

start_time = time.time()
lis = longest_increasing_subsequence(nums)
end_time = time.time()

print(f"Test Case Size: {size}")
print(f"Longest Increasing Subsequence Length: {lis}")
print(f"Runtime: {end_time - start_time:.5f} seconds")

# Test for all test cases
test_longest_increasing_subsequence(longest_increasing_subsequence)

TechKemon avatar Sep 27 '24 21:09 TechKemon

Hello!

Yes, you should remove the raise Exception in the run_function_in_interpreter function. We do this to ensure you are aware you are running model-generated code.

It is always best to run this in a sandbox enviornment.

vinid avatar Sep 27 '24 21:09 vinid