I am facing an issue with the course’s grading system.
The error message I receive is:
“Cell #10. Can’t compile the student’s code. Error: ValueError(‘Asked to retrieve element 0, but the Sequence has length 0’,)”
However, my code runs perfectly in my local environment and in Coursera’s runtime environment.
It seems like the evaluation system is failing for unknown reasons.
Just because the notebook runs correctly locally does not mean that all your functions are completely correct. The grader may use different test cases. The first thing to check is that you have not “hard-coded” any assumptions in your code to match the local test cases. That could include referencing global variables from the body of your functions.
please post screenshot of the error you are encountering. please make sure not to post any of the grade function codes.
if this error log is your submission grader output, then post screenshot of show grader output.
the fact that your code run perfectly as mentioned by you but showed value error in submission grader, and the details of error explains value error was encountered because it is explaining one your recalled function is looking for element in list function, 0 length.
This screenshot shows the output of cell 10, and the other image shows the error I encountered. Apart from that, what are the things I need to change or be careful about in the other parts of the code? I have tried it multiple times, and it appears to work without any issues.
The cell shared by you which threw error which you are stating, isn’t in the assignment. So make sure not to add/delete/edit anything outside of the assigned markers
###START AND END CODE HERE###
You are suppose to only replace the None placed between these markers. I am sharing an image of grade function without written codes (as posting codes is against community guidelines)
So make sure in each grade function where ever that None is mentioned is replaced with your written codes and no other places/cells are edited/added/deleted by the coder/programmer for successful submission.
Please get a fresh copy and re-do your assignment by following the instructions I mentioned and if your codes were written correctly, you should be able to successfully pass your assignment.
Could you please guide me on how to re-download the assignment from scratch on Coursera? I would like to ensure I’m working with a fresh copy to avoid any unintended changes outside the specified code markers.
I am experiencing some issues with file paths as well. Should I avoid changing these paths too?
I am currently working on the “AI for Medicine” specialization assignment and facing some issues during the automatic evaluation process. The feedback I received is as follows:
Function “np.moveaxis” not found in Code Cell UNQ_C1.
Function “K.sum” in Code Cell UNQ_C3 does not contain the minimum number of expected arguments. (Expected 2 arguments)
Here is the detailed feedback summary from the system:
Code Cell UNQ_C1: Function ‘get_sub_volume’ is correct.
Code Cell UNQ_C2: Function ‘standardize’ is correct.
Code Cell UNQ_C3: Function ‘single_class_dice_coefficient’ is correct.
Code Cell UNQ_C4: Function ‘dice_coefficient’ is correct.
Code Cell UNQ_C5: Function ‘soft_dice_loss’ is correct.
Code Cell UNQ_C6: Function ‘compute_class_sens_spec’ is correct.
The system also suggests that if multiple functions are marked incorrect, it could be due to dependency issues where one incorrect function may cause other functions to fail.
However, I have not made any modifications to the provided code cells, as per the assignment instructions. I believe there may be a missing import or configuration issue that is causing the system not to recognize the np.moveaxis function and the correct usage of K.sum.
Could you please advise on how I can resolve these issues without modifying the restricted code cells? Is there a recommended approach to ensure that the evaluation environment recognizes these functions correctly?