NameError: name 'SOURCE' is not defined

Hello @Deepti_Prasad ,

  1. For # GRADED FUNCTION: split_data,

You have written “SOURCE” . It should be “SOURCE_DIR”, as mentioned in the parameter of the function : def split_data(SOURCE_DIR, TRAINING_DIR, VALIDATION_DIR, SPLIT_SIZE)
Therefore it is not defined.

So to fix your error : Replace all the “SOURCE” with “SOURCE_DIR”.

  1. After this gets fixed you will fall to more errors, as you have written :
  • “VALIDATION” instead of “VALIDATION_DIR”
  • “shuffled_Set” instead of “shuffled_set”
    So replace these as well.

You need to keep in mind the correct parameter names.

  1. Next you will face another error due the code you wrote in # GRADED FUNCTION: create_train_val_dirs. Check this : Details of failed tests for create_train_test_dirs - #7 by nilosreesengupta

Hope this helps.

With regards,
Nilosree Sengupta