I received error " There was a problem compiling the code from your notebook. Details: name ‘Transform’ is not defined" for all questions and got 0 points. However, I was able to excute all cells and get expected output in C2W3 assignment when I ran it locally.
Did anyone encounter the same problem and knows how to solve this?
Perhaps the “Transform” object is a global variable in the notebook, but the grader doesn’t provide it.
Using global variables is usually a mistake.
Is there a way to fix it on my side?
Perhaps. Look at your code and see if you are using any global variables.
no. I didn’t use any global variables in the assignment
Hopefully a mentor for your course will be able to assist. I have not seen the materials for that course.
Most of the issues with assignment grading are common across all courses, though.
I have also not seen any of the course materials for MLOPS, so don’t know the details of that assignment. But have you tried searching the notebook for
Transform? Is that defined anywhere? Is the definition in any way conditional? E.g. would it not get executed if some conditions are not met?
Debugging always starts from the error message, right? In this case, it seems pretty clear what to look for.
Please click my name and message your notebook as an attachment.
Please note that you’ve not written the code for the cell containing:
As a result, cells that follow it will fail.
Transform isn’t directly imported. This is the location:
Given that we’ve imported
from tfx import v1 as tfx, accessing
Transform should be easy now.
Note that a compilation error will fail the grader and award you a 0. See if #grade-up-to-here helps.
ah I see. #grade-up-to-here helps to get the partial grade. Thank you for the help!!!