pythonfile-structure

Running Bash in Google Colab with three parameters (python, training)


I'm trying to run the below code to train a model. For some reason, it doesn't seem to be able to locate "my_file" (the second parameter).

I think it has to do with the file structure.

!bash script/train.sh my_file.zip 1

For some reason it seems to move to a directory like "data/ ". Any idea why that might be the case?


Solution

  • Is the file my_file.zip in the same directory as your script or in the same location where you're running the script from. You could also change the location in the script so that you don't have to control it at runtime. Just some ideas to look for.

    Try this link to a notebook on colabratory for accessing files as it might answer your question better.