Beginner: Beginner questions that don't fit elsewhere ✅

That’s because by default kaggle CLI downloads competitions to a path with the same name as the competition.

2 Likes

Hi @bencoman I just made sure I was following the intent of the notebook as I’d made some changes locally (along the similar lines as OP) and that broke the downloading part for me as well. This was more of a case of me not understanding what was going on. Jeremy has explained why it is the way it is.

re: PRs I’ve not done one, but definitely maybe sometime in the future when I feel confident enough to push changes to the fastai repo I’ll try it.

cheers!

1 Like

I’ve just starting to use paperspace, and want to use the fast.ai library on it,
but when I create a notebook by selecting the bright shiny “fast.ai” logo…
image

image

The notebook is pre-populated with the whole Fastbook - which is a great quickstart when I’m working through the book, but I’m confused how to get a clean notebook.
image

Under Advanced Options when creating a Notebook I can see Fastbook specified as the Workspace URL…

So should I delete all those fastbook notebooks, or is that “fast.ai” workspace “just” for the book, and I should instead be creating a workspace based on PyTorch and then pip install any missing packages like fast.ai,
(which is the next thing I’m in progress trying… and heh! I just noticed command starts jupyter-lab rather than ./run.sh for the fast.ai workspace.)

Should I immediately clone the given workspace and use that as MyWorkspace, or only rarely clone and customise them if really needed?

[Edit: See down two comments.]

1 Like

Hi @bencoman , by “clean notebook” do you mean an empty notebook? I’ve used JupyterLab a little bit and still learning about it, but I think if you just hit the document with + inside it, it will create a new notebook in the directory structure. To get a “clean” version of Jeremy’s notebooks you can look in the “clean folder” (the one above the images folder in your screenshot.

To get the bash shell, I usually just click the command line thingy in the left bar (the black square with white > inside it)

HTH

1 Like

Thanks for your response Mike. Yes, I meant an empty notebook - or actually, an empty workspace. Further research, I found an answer here…
https://docs.paperspace.com/gradient/tutorials/notebooks-tutorial
which towards the end says:

For example, let’s say we were browsing Papers with Code and we stumbled upon a really cool new implementation of CLIP that uses a different artistic technique to generate artwork. To try it out we could create a new notebook with Workspace URL in Advanced options set to:
https://github.com/pschaldenbrand/styleclipdraw
This would pull the target files into an instance running the default Gradient container.
The next step after that would be to fork the repository and modify it.

So far, I’m inclined to think the usual procedure might look like:

  1. Select the fast.ai logo to pre-fill the Advanced options
  2. Change the workspace to a git repo of my own
  3. Leave the default fast.ai container in place.

The next thing to discover is how to commit-push back to github from Paperspace.

But right now, my running machine is showing 6 minutes left and I can’t work out how to reset it for the running instance.
image

Here it says: “Auto-shutdown can be enabled or disabled for each machine individually, by navigating to that machine’s settings page in the console.” But I can’t find that machine’s settings page.

Well, damn! It seems that its easy to run code cells without saving the file, and then the Auto Shutdown doesn’t preserve the state of the unsaved file. When I restarted the machine, my file was empty.
Bam! An hour of effort down the drain. Principle of Least Surprise = Fail (Is there something I missed doing, to avoid that?)

1 Like

We’ll be answering all those questions in today’s walk thru!

2 Likes

Unfortunately you cannot extend time on a machine once the instance has started so best to push the window out to give yourself some time. You can update how long the machine will run before automatic shutdown in the dropdown before you start each session.

When creating a new notebook within a project you can specify your git repo in the workspace URL and those files will be loaded when you start the machine.

If you have connected your account to Github you can clone and push back to repos you own using terminal commands.

I’m not sure what you mean about losing progress on you file. You can save files to the notebook and they should still be there after the instance shuts down. Did you save the files before it shutdown or did it shutdown while performing a download?

1 Like

I’ve been learning a lot more about pathlib over the last day and found that using pathlib in .py scripts you can run the command:
print(pathlib.Path(__file__))
and it returns the full path including the file name but it doesn’t work in ipynb files.

Is there a simple way to programmatically assign the name of your Jupyter notebook to a variable? I found a few approaches on stackoverflow but they seemed a little verbose and didn’t work for me on the Paperspace JupyterLab environment.

No not really, unfortunately.

Hi Matt, this is kinda of not “pythonic” but seems to work for me in my local jupyter notebook instance:

myvar = !readlink -f 'Fastai2022 - Lecture #4 Kaggle notebook.ipynb'
myvar

I got the name of the ipynb file by doing a ‘!ls *.ipynb’ in another cell.

I recalled Jeremy had mentioned in one of his tips that we can use shell variable calls, so I tried assigning it to a python variable and it worked!

No I didn’t. Mostly my own fault. I’ll now be more diligent.
However I foresee situations that could still bite, like one of my kids gets a splinter and drags me away longer than expected, that the same thing happens.
It would be really nice if an auto shutdown (i.e. not a direct action of mine) saved the environment, so after restart its identical to when I left it, including unsaved-files (and for bonus points, including the undo history.) That would be the least-suprising behaviour.

1 Like

Hey folks,

I’m looking for recommendations for a new laptop that can handle many of the tasks in the course.

It’s been ages since I bought one and my preference is to spend as little money as possible. :slight_smile: and use online resources like paperspace for heavier workloads.

Thanks so much!

Adi

Literally any Windows or Mac or Linux laptop at all, including used ones, will be plenty good enough for all the tasks in the course, when combined with Paperspace for GPU workloads.

4 Likes

If you really want to do DL on a laptop, I’d suggest a mid-range gaming laptop with NVIDIA cards. They’re cheaper than “ultrabooks”. AMD CPUs provide better bang-for-buck compared to Intel ones. So you may wanna factor that in.

2 Likes

Thanks @jeremy!

Thanks @gagan!

1 Like

FWIW I would recommend not getting an ARM64 (Apple Silicon) Mac at the moment. The open source software community is still catching with the new architecture and some packages like PyTorch may not work as expected out of the box. For a developer who is comfortable with package managers and managing environments it may be of more interest but for data scientists at the moment I think it is a big distraction.

On the other hand owning an M1 has pushed me to learn more but about non-DS related stuff and becoming more enthusiastic about cloud DL offerings like Paperspace and Colab. If you want to do DL on the laptop I would steer clear of an M1 for now.

3 Likes

Hi Aditya, Jeremy’s comment is an extremely important point. I have a 2015 macbook pro 15" and it’s still chugging along. I can do pretty much everything except DL on it, and it’s intel based so, no compatibility issues. Used Intel macs can be had for reasonable prices but YMMV (see @Mattr comment on Apple Silicon.)

Having said that, I think any windows laptop with a recent nvidia gpu should be fine. Even the hash-rate restricted GPUs work fine for ML/DL work from what I’ve read, and it seems most all new Nvidia cards/drivers do the HR restriction now.

2 Likes

Thanks @Mattr I’ve had a mac for a long time and I’m finding that it is becoming really expensive to justify. I’m happy to get a clunky but sturdy windows that does the job and use cloud gpus for anything else. I shifted most of my experimentation to colab, including non DL work. My work laptop is a windows but it is locked so I can’t run anything locally which is why I’m considering getting an entry level personal machine.

1 Like

This question is about Jupyter IDE bracket autocompletion. In VS Code, RStudio and most IDE’s you can highlight areas and press bracket and the highlighted area becomes bracketed. In Jupyter this deletes as it would in a word processing software. Is there a way to add-on this functionality for Jupyter Lab/Notebook?
autobracket

1 Like