carpentries-incubator / intro-image-classification-cnn

new lesson on image classification with convolutional neural networks
https://carpentries-incubator.github.io/intro-image-classification-cnn/
Other
2 stars 3 forks source link

Set correct working directory in code #31

Closed marklcrowe closed 4 months ago

marklcrowe commented 5 months ago

At various points in the code, data is written/read from the "fit_outputs" directory. In the zip archive, this is within the "scripts" directory. But following the code as per the guide, the working directory does not get set to "scripts" so instead it tries to access a "fit_outputs" directory either in the home or intro-image-classification-cnn directories (and when writing, seems to silently create that directory). We should probably either use absolute paths or explicity set the working directory to the right location.

erinmgraham commented 4 months ago

When running complete scripts (Run All) inside the Spyder IDE, it automatically changes the working directory to where the script is located. Preference is to use relative paths, not absolute paths.

TODO Add content explaining this functionality in Spyder and reminding users how to set explicitly when running

erinmgraham commented 4 months ago

Added instructions to setup detailing how to set working directory in spyder and also added callout to ep 01 to remind everyone what to do.