Global AI and Data Science

Global AI & Data Science

Train, tune and distribute models with generative AI and machine learning capabilities

 View Only

Need help with running the notebooks from the course Exploratory Data Analysis for Machine Learning

  • 1.  Need help with running the notebooks from the course Exploratory Data Analysis for Machine Learning

    Posted Fri July 22, 2022 09:09 AM
    Hi everyone, 
    I have started learning the course Exploratory Data Analysis for Machine Learning. There are jupyter notebook exercises where I need to read a db file.  I have followed the part where it explains step by step on how to read the sql db file. Apparently, I need to use a function called cos2file as follow (it is given in running jupyter notebooks in IBM Watson Studio part in the course) : 

    def cos2file(p,data_path,filename):
    	data_dir = p.project_context.home + data_path 
    	if not os.path.exists(data_dir):
    		os.makedirs(data_dir)
    	open( data_dir + '/' + filename, 'wb').write(p.get_file(filename).read())
    when I try to run this function with arguments as project from my project token, '/data', 'classic_rock.db', The file classic_rock.db is given in the course. I get an error stating. I couldn't figure out what went wrong. Can someone help? 
    NoSuchKey: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.



    ------------------------------
    Selin Taskin
    ------------------------------



    #AIandDSSkills
    #DataandAILearning
    #AIandDSSkills