I have been having a lot of trouble with some of the file management functions. I thought I finally worked through it, but I am getting this error, which I do not understand. Since we are not using Colab for this assignment, I used my own file directories and don’t even have a tmp directory, so this error really baffles me.
Details of failed tests for create_train_test_dirs
Failed test case: There was an error grading this function. Details shown in ‘got’ value below:.
Expected:
no exceptions,
but got:
[Errno 17] File exists: ‘/tmp/tmpn8ko9a1h’.
All tests passed for split_data!
All tests passed for train_val_generators!
All tests passed for create_model!
Hi Johnny! Are you still having trouble with the assignment? I saw you reply in the other thread but not sure if it was already resolved. Thanks.
Hi Chris. Yes, it has me stumped. I can’t get past it and have put the class on hold. It is frustrating, because I am able to pass the deep learning tasks, but am hung up on file administration.
Hi Johnny! There was a recent update to the autograder and it might handle this error. Please re-open the notebook from the classroom and paste your solutions there. There might be some slight modifications on the variable names but the tasks will remain the same. If the grader is still throwing errors, please report here so we can escalate. Thank you and hope it works this time!
Thanks for your help, Chris. However, now it has gotten worse. Instead of giving me 38/50 I am now getting a grade of 0/50.
It is throwing these errors, which are new to me (I haven’t changed the code since the last time I submitted it):
Details of failed tests for create_train_val_dirs
Failed test case: create_train_val_dirs has incorrect type.
Expected:
typing.Callable,
but got:
<class ‘NoneType’>.
Details of failed tests for split_data
Failed test case: split_data has incorrect type.
Expected:
typing.Callable,
but got:
<class ‘NoneType’>.
etc…
Hi Johnny! Please check your inbox. We’ll need a copy of your notebook to troubleshoot more effectively. From the error messages, it seems like it’s not seeing your code and that is strange. Make sure that you’re using the new notebook from the classroom and that all cells are running without error. In any case, we’ll surely find out what is wrong when we get your notebook. Thanks!
Hi @Johnny_Dukovich,
this error is probably being caused because we updated the graders recently to allow the use of global scope + fixed some bugs.
Could you try getting the latest version of the assignment? To do this, visit the link provided in the classroom which should redirect you to colab. This new version of the assignment contains some extra metadata required for grading, so create a copy of it and on this new version (which should be blank) copy and paste your solution, check that everything is running correctly (you can also try submitting without running since the training usually takes a long time), download your notebook and submit for grading.
Hi Chris – Thanks, I really appreciate this. My notebook is attached. It works on my Windows 10 computer. The original framework was downloaded from GitHub. I also got a message from a staff member called “a-zarta” who said to check Colab. I don’t remember there being a link to Colab before, however there is one now. I can’t get that version to work.
Hi - thanks for your response. I cannot get the new Colab notebook to work. I get this:
There are 0 images of cats for training
There are 0 images of dogs for training
There are 1 images of cats for validation
There are 1 images of dogs for validation
However, on the notebook I am running on my computer (locally), using the same code I get:
Skipped 666.jpg
File is zero length, so ignoring.
Skipped 11702.jpg
File is zero length, so ignoring.
There are 11250 images of cats for training
There are 11250 images of dogs for training
There are 1250 images of cats for testing
There are 1250 images of dogs for testing
Hi Johnny. I got your notebook and saw some discrepancies with the variable names. As Andres mentioned, please reopen the notebook from the classroom. Create a copy then start solving it again. The code will look very similar with only some small but critical changes. Here are some tips:
- Please watch out for some revised variable names. The
test
variable names before are now called validation
. Please look at the docstrings of the functions to know which variable names should be used. Please do not modify these names. After correcting these, I was able to get the expected output:
-
More importantly, please do not modify anything outside the START CODE HERE
and END CODE HERE
tags. Your solution should only be placed between these markers to ensure successful grading.
-
Related to point 2 above, I recommend doing the assignment in Colab instead of your local machine to avoid modifying directory names to match your local workspace.
If this still doesn’t work, you can reattach your newer notebook in the direct message in your inbox. Please do not upload your notebook in this public thread because it violates the Honor Code. Nonetheless, I think you’re very close! Model training is still ongoing as I type this but it’s looking good. Hope this helps!
EDIT: I got the perfect score with your solution after following the tips above!
2 Likes
Thank you so much! I restarted with the current version on Colab, got it working, downloaded it, and got 100/100. I really appreciate the time you put into helping me.
1 Like