You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may be missing an option, but would there be a way to limit memory use per-test / question?
In a Gradescope AG, the following code results in the whole ok process (and thus any output parsing working) at a ~6-7s timeout on smallish machine with 768mb of ram. We can use --timeout 5 to get this down so the whole thing isn't killed, but I wonder if we could specify a per-question memory limit (which could conceivably be freed after each test case or question?)
defarange(start, end, step=1):
""" arange behaves just like np.arange(start, end, step). You only need to support positive values for step. >>> arange(1, 3) [1, 2] >>> arange(0, 25, 2) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24] >>> arange(999, 1231, 34) [999, 1033, 1067, 1101, 1135, 1169, 1203] """"*** YOUR CODE HERE ***"full_list= []
new_number=startwhilenew_number<end:
full_list.append(new_number)
new_number+=start## This is the bug. should be step which fails in 2nd docketsreturnfull_list
I may be missing an option, but would there be a way to limit memory use per-test / question?
In a Gradescope AG, the following code results in the whole ok process (and thus any output parsing working) at a ~6-7s timeout on smallish machine with 768mb of ram. We can use
--timeout 5
to get this down so the whole thing isn't killed, but I wonder if we could specify a per-question memory limit (which could conceivably be freed after each test case or question?)This might be possible...
https://docs.python.org/3.12/library/resource.html#resource.setrlimit
https://www.geeksforgeeks.org/python-how-to-put-limits-on-memory-and-cpu-usage/
The text was updated successfully, but these errors were encountered: