Closed Reason-Wang closed 7 months ago
Hi, @Reason-Wang , First of all, I would like to clarify that this API is not designed to be requested manually.
It seems that I need to input a index and the system would test the pre-defined example corresponding to that index. Is there any way to test in new examples. For example, will simply replacing the data in data folder works? If that works, how should I set the index (i.e. what is the naming rule for the index correspoing to an example).
There's several ways to test custom data. If you wish to set up a new task setting, you may implement the Task
class in src/server/task.py
and start a new task worker. Or if you just want to add more data to an existing task, simply replacing the data in data folder will work, the indexing rule can be found in the corresponding task definition code, for example, here.
Also, a better way was like I can dirrectly set the question in start sample request like this:
result = requests.post( "http://xxx.xx.xx.xx:5000/api/start_sample", json={"name"="os-std", "question": "In this problem, your task is to ..."} )
Is there any way to support this?
As mentioned before, This API is designed to be called by assigner. It's more convenient this way for pogram to identify which question has been tested and which hasn't.
With the following code snippet, I got the output like this:
It seems that I need to input a index and the system would test the pre-defined example corresponding to that index. Is there any way to test in new examples. For example, will simply replacing the data in
data
folder works? If that works, how should I set the index (i.e. what is the naming rule for the index correspoing to an example).Also, a better way was like I can dirrectly set the question in
start sample
request like this:Is there any way to support this?