Assignment 1: cannot lauch, please help with Colaboratory

I am having trouble moving to work in the Colaboratory environment . I was using Anaconda Navigator, but at a glance Colaboratory made more sense. Howerver, I am now lost. I have already asked for an extension not because of the material, but this environment is so confusing to me.

Fundamentally, I feel like I am flying dark because I am unable to see file manager in the virtual machine. I have one ipynb file for the assignment, and I have juggled it back and forth between running on Colaboratory platform and trying to use a desktop version, without Anaconda Navigator. And I wasted a large body of time trying to figure out the run-local-on-colab as it was advertised.

I have forged my way past create_train_val_dirs(), and when I get to the part where I a write the split_data function, I am fully cognizant of the technicque having done it numerous times in R, I have no idea what those template provided arguments are supposed to mean, specifically SOURCE_DIR, or where they come from.

It seems like the instruction is more process and less architecture. What is wrong with me? I do not see other inquiries in this regard on this discussion.

Please someone, can you help me out?

Hello @Doug_Epling ,

Check some Google colab tutorials. Google colab is the simplest. Don’t worry, you will love it once you understand it.

What do u mean by R here?
R programming? This is a python course. Things will be different.

Don’t worry, just revise the lessons.

With regards,
Nilosree Sengupta

2 Likes

Machine learning with R is very similar to machine learning in Python. Both use the same underlying computer science.

Hello @Doug_Epling ,

Yeah definitely logic stays same!
I mean to say syntax, template and few things will be different when langauge is different right?

With regards,
Nilosree Sengupta

1 Like

Hello @Doug_Epling ,

  1. check this tutorial : https://www.youtube.com/results?search_query=google+colab+tutorial+for+beginners

  2. You can try to read the hints few times to understand these

With regards,
Nilosree Sengupta

2 Likes

I was looking for a little more understanding where I don’t have it. For example, my wild guess is that SOURCE_DIR is the same as source_path where the files reside after download. Why doesn’t it say this anywhere in the instructions. This seems like a basic piece of information needed, yet it goes with the assumption. Is this correct?

Hello @Doug_Epling ,

Yeah sure, once you get specific with your doubts, we are here to explain.

It’s given in the hint. I have underlined fory ou what’s source_dir.

With regards,
Nilosree Sengupta

1 Like

So in the root directory of the Colaboratory virtual machine, am I supposed to find my work in /tmp or in /content?

Hello @Doug_Epling ,

You dont have to check any directory. Things are already set up.

With regards,
Nilosree Sengupta

1 Like

Please understand that I have been working on this for at least a week. At this point, I need some help. I have no confidence that if I read one more scrap of documentation, it will all come to light. Since you have such experitise, could you summarize the upshot of your recommended reading?

Hello @Doug_Epling ,

Yeah sure! We mentors are here to help you.

Though I am still not clear about your particular issue, I am giving you a general idea of how to do your assignments.

  1. You need to code between the block where you just need to write the functions mostly :
### START CODE HERE
....
....
### END CODE HERE
  1. You need to read the hints to understand what you need to code.

  2. After every graded function, there is a test cell -
    #Test your XYZ function. That will test your function fetching inputs from given directories. So you don’t have to think about directories.

  3. Example function : create_train_val_dirs
    Check this to understand how to interpret frm hints.
    Details of failed tests for create_train_test_dirs - #7 by nilosreesengupta

With regards,
Nilosree Sengupta

1 Like

Hello @Doug_Epling ,

You don’t need to think about file manager .

  • in the Begining of notebook, you are already downloading the dataset.
  • Then the function def create_train_val_dirs, you just use os.path.join to append the new directories to the root_path parameter.
    Like this:

You don’t have to do anything manually.

With regards,
Nilosree Sengupta

1 Like

Hello @Doug_Epling ,

It seems like this because things are explained in hints in details and relatively tasks are simple.

Hope I have explained every aspect of your merged collection of doubts in parts.

If I am missing out on any thing or If you are stuck with specific part/specific error, let me know.
Also let me know if it’s clear.

Feel free to post wherever you are stuck again.
Happy learning!

With regards,
Nilosree Sengupta

1 Like
I think we are both mistaken because there is no answer to the question we are debating.  The code clearly assigns both "/tmp/cats-and-dogs" AND "/tmp/PetImages/."  But as far as the logic of the code goes it amounts to a 'bug'.  

Dear Nilosree –

I can’t make up my mind. So if i download the notebook to my Google Drive. And I open the ipynb project into colab, if I click the hyperlink at /tmp/PetImages/, I get some action in my file manager. Now I feel more like I am dealing with a full deck.

I am sorry for being a pain. Thanks for your effort to help.

Hello @Doug_Epling ,

It’s not all a pain. You’re welcome!

I am not debating Sir. I have been explaining to you each part of your questions

That’s why I have explained separately, Sir.
To avoid miscommunication, I am merging it for clarity.
1.

With regards,
Nilosree Sengupta

1 Like

Hello @Doug_Epling ,

You can check the instructions above the cells.

I hope this helps.

With regards,
Nilosree Sengupta

Never mind

Hi, I am trying to launch my App using the instruction from Large Language Models with Semantic Search Course using Colab.

So I started with :
“”" !pip install cohere, !pip install weaviate-client.“”"

then:
I had NotFound Error applying when i run the next code
" ““import os
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file””"

And also the next one:

“”“import weaviate
auth_config = weaviate.auth.AuthApiKey(
api_key=os.environ[‘76320a90-53d8-42bc-b41d-678647c6672e’])”

It didn’t work with the provided public key or with my private key. any idea what could be the issue ?

Hello Doug,

Were you able to solve the code for the grader cell?

If not, please refer to this link. It is an elaborative explanation on how to work upon the two grader cell creating your root_path and split data section.

If any doubt, please ask. I agree doing some assignment can be nerve wracking, whenever such things happens take a break.

Go one grader cell at a time, take break once you have got the desired output.

Hope it helps!!

Keep Learning!!!

Regards
DP

1 Like