Developer chat

OK, thank you for showing me that it’s js/template-generated and not in the source code.

I guess I can’t rely on a local fs link checker (it’s just much much faster). That’s OK, the live site’s one seems to work and reports a lot more problems. The latest one is here:

Thank you, Andrew.

Edit: I guess I can change the local fs link checker to fire up jekyll, run the check and then take it down - that would do the trick.

If you bundle exec jekyll build then it’ll create your site in the _site directory.

Important change in the API of RNNLearner described in details here.

Also, removed all get_mnist(), get_adult(), get_imdb() methods from datasets since it was making

  1. the library import vision and text all the time
  2. circle depencies

I’m in the process of updating the docs and all the examples accordingly.

1 Like

I hope this thread is ok for this: Would it make sense to have a check_images method in ImageDataBunch? @Taka and I had a short discussion in the “share your work” thread of the ongoing course. I used a very simple quick and dirty for loop to check for file integrity in my little fun notebook:

A parallelized version with a delete flag could be nice for cleaning a dataset.


@stas Great idea. But before doing the merge “surgery”, note that there may be other workloads occupying parts of the GPU, and many GPUs to choose from.

How about providing a simple API that

  1. returns a list of how much RAM is available at each GPU (via-smi)
  2. returns the RAM requirements for a given model x, so that we can then set the bs and GPU using whatever policy…

Also, using LMS or other high-bandwidth swapping GPU-CPU RAM mechanisms we can deploy much bigger models with a minimal performance penalty…

For beginners the simpler thing is to have a bs table/multiplier factor, as there are just a few GPU RAM configurations, eg 8GB, 11GB, 16GB, …

@gsg, See my post earlier where I started working on this - Developer chat - it got no feedback.

Also see Show GPU utilization metrics inside training loop (without subprocess call!)

I made a new mem-utils branch with the starter code. (new code is in fastai/utils/

Also, this should work gracefully on CPU-only setups.

new release has been published:

1.0.13 (2018-10-24)


  • pretrained language model is now downloaded directly in the .fastai/models/ folder. Use pretrained_model=URLs.WT103
  • add an argument stop_div to Learner.lr_find() to prevent early stopping, useful for negative losses.
  • add an argument convert_mode to open_mask and SegmentationDataset to choose the PIL conversion mode of the masks.


  • URLs.download_wt103() has been removed

I was looking into the codebase and noticed that bidir parameter was never exposed here. Is this intentional?

update on the fastai_docs tools

  • all tools are now under fastai_docs/tools

  • tools/update-nbs replaces docs_src/tools/ and docs_src/tools/

    usage of fire has been removed, one script can now update specific or all notebooks, the usage of arguments to be passed changed a bit to a simpler:

    update all notebooks:

    update specific notebooks:
    tools/update-nbs docs_src/one.ipynb docs_src/one.ipynb

    to pass arguments to update_notebooks just use add any of:
    --update_html --update_nb --update_nb_links --do_execute --update_line_num
    and that would indicate --arg=True, otherwise the defaults are used

    updated docs:

  • docs_src/tools/ moved to tools/ and the data was split off into docs_src/sidebar/ (feel free to relocate the data elsewhere if you don’t like that location, but please not in tools/ folder - thank you).

    updated docs:

1 Like

Also @sgugger or @ashaw can you please look at two XXX comments I made at: I am not sure those are still relevant/correct - can you please validate/remove/fix?

@ashaw, I also noticed that : from headers makes it into the #anchor, e.g.:

Thank you!

Do you mean to ask if we still need a function that does just one notebook? Yes, definitely.

I made a new mem-utils branch with the starter code. (new code is in fastai/utils/

Very good start. Just tested it on 2 different servers…
Now it also reports the memory available for the smaller dedicated graphics card (eg a 710) which is not a good candidate for running CUDA.

1 Like

Could fastai.version include the date, eg 1.0.14.dev20181025 ?

@sgugger Any comments on this :point_down:

@sgugger, both XXXs are where the function is called on a python file, not ipynb - which I don’t think exists anymore, is it? If it is can you update the example to reflect it? Thanks.

.dev0 just means it’s not a release. i.e. not reliable.

The date would be useless because 20181025 in one part of the world will not be 20181025 in another, so it’s not a good reference point. If you need to rely on an exact time stamp, you can always use git tools to see when the last commit was made in the fastai repo of your checkout.

Unless you meant (no dev in your example), then your question is of a different nature.

Probably need to provide a way to exclude certain cards.

One way would be to tap into the existing CUDA_VISIBLE_DEVICES=“1,3” env var from pytorch. That way you can exclude the devices you don’t want to be reported. And it’ll work in fastai and pytorch (my code needs to be changed to include that).

Oh yup some of those are outdated. Good catch. I’ll take care of updating the gen_doc stuff!
(CC: @sgugger)

1 Like

I have never used those functions or seen them before.

Cannot get Wideresnet to work even with pretrain=False:

learn = ConvLearner(data, models.wrn_22, metrics=error_rate, pretrained=False)

The order of problems:
-corrected wrn_22 to wrn_22(pretrained=False) because the new fastai version requires this argument
-corrected num_features so that it return 0 when i cannot find the attribute num_features. However that leads to problems later be in layers line 33 “layers.append(nn.Linear(n_in, n_out))”

what i missing her ?