Cannot grade assignment : failed test case

I am using the exact same notebook as given in the link to the assignment, and all my graded functions have the same output as the expected output. Yet I keep running into this error when grading:
Failed test case: create_train_val_dirs has incorrect type.
Expected:
typing.Callable, for all my graded functions.
I’ve seen other posts where the solution is to check if the function is right or the notebook is right but both of these are correct in this case. Absolutely no clue on how this can be solved. Attaching the notebook for reference.

[code removed by mentor]

1 Like

Hello @Swapneel_Bhatt ,

You have hardcoded the paths. Hence you are getting stuck at test case.

It’s given in the Hint:

HINT:
Use os.makedirs to create your directories with intermediate subdirectories
Don’t hardcode the paths. Use os.path.join to append the new directories to the root_path parameter

Check this solution to a similar error.

With regards,
Nilosree Sengupta

Hi,
I’m sorry I still fail to understand what is meant by “hardcoding”, since I used the method you mentioned in the linked answer and it still gave me a failed grade.
this code gives me a correct output but failed grade, you can find the attached updated notebook

[code removed by mentor]

Hello @Swapneel_Bhatt ,

I have reciprocated with your updated notebook from my end. Following the linked solution, your code is now okay for the function : def create_train_val_dirs(root_path). But still test cases fail.

And not only the first one, for all functions your test cases are failing.

I had solved a similar case before.
See this thread:
All functions have incorrect type (Nonetype)

Now, try once getting a fresh copy of notebook from the course and write the functions again.

With regards,
Nilosree Sengupta

Hello @Swapneel_Bhatt ,

Btw, As per the community guidelines, learners are free to post their errors copy pasting or screenshots forms and discuss about it, but not supposed to post screenshots of code snippets solutions or their notebooks or publicly on community.

So from next time, send me your notebook via dm such that I can check where it went wrong.By clicking on the profile picture, you will see an option to message.There you can attach your notebook.
Then we can discuss the issues here, under the topic you created.

With regards,
Nilosree Sengupta