Problem with assignment

Continuing the discussion from Definition of ML:
Guys I have a problem with my assessment.
In the lab assignment i am writing my code all correctly but even then it’s shows error. And the main part is the error is related to that cell in Jupiter in which we can’t do editing. Please help i have got few days to submit my assignment.

@Priyanshu_kumar5,
Welcome to the community!

If you are seeing an error, it’s most likely due to something in your portion of the code. That could still affect cells that you haven’t edited. Can you please share a screenshot of the stack trace error you are seeing so we can help narrow down the problem?

{1st screenshot removed by mentor}


Please find the attachment

1 Like

Thanks, @Priyanshu_kumar5,
I should have mentioned that you should not share your own code, since that’s against the community guidelines - just the errors you are receiving. I’ve removed the screenshot of your code here, but just so you know for the future.

I did notice a couple of things in that screenshot before I removed it, though:
1). In the compute_cost cell, I did not notice these two comment lines at the beginning:

# UNQ_C2
# GRADED FUNCTION: compute_cost

Please make sure those lines are there at the beginning. The grader uses those comments to find the code it needs to grade.

2). The next cell, that starts with <details>, should be a cell with instructions in Markdown, but it looks like it accidentally was changed to a code cell. To fix this, select the cell, then go to the command bar, and change the dropdown from “Code” to “Markdown”. Then, place your cursor in the cell and execute it by holding down the shift key and pressing return. This should change it back to Markdown, so it looks like this:
Screen Shot 2023-05-12 at 11.26.12 AM

Trying to execute this Markdown as code is what’s giving you the weird error about <tokenize>

Finally, the last error in your screenshoot shows X_train is not defined. You can fix this by making sure to execute the cell towards the beginning of the assignment where X_train is defined. (I expect you just didn’t happen to run it for this screenshot because you were focusing on the other error)

I hope this helps.

Oh… one more thing: You posted this in W1, but this exercise is for week 3. Can you update the post to move it to W3? (You can do this by choosing the pencil icon next to your title, “Problem with assignment”)

2 Likes

The problem as per your screenshot is of Indentation.
To solve this,

  1. Select the cell, then go to “View” option in the horizontal bar.
  2. In View select, hover over “Cell Toolbar”, then select “Edit Metadata”.
  3. A small box of Edit Metadata will appear on the top right side of cell. Click on it.
  4. After clicking on it, replace the “editable” option from false to true and save it.
  5. After saving, align the tags properly in proper indentation.
  6. Go to step 4 and revert the “editable” option to “false”. ITS IMPORTANT

Hope this solves your problem.

1 Like

Thank you everyone for the help and do the corrections right away.