fastai
fastai -- [is fastai a package we want to maintain?]
"Fastai is the first deep learning library to provide a single consistent interface to all the most commonly used deep learning applications for vision, text, tabular data, time series, and collaborative filtering.
This is important for practitioners because it means if you’ve learnt to create practical computer vision models with Fastai, then you can use the same approach to create natural language processing (NLP) models or any of the other types of models we support” [1].
Running fastai in HPC [ this demo is broken, fastai.vision module is not available ]
Copy the directory "FASTAI" from /usr/local/doc and cd to it. You will find a script file "fastaiLessonPETs.py" from a tutorial [2] [3] and a job file "fastai.slurm".
cp -r /usr/local/doc/FASTAI .
cd FASTAI/
Untar the data files in tar.gz format
tar xzvf annotations.tar.gz
tar xzvf images.tar.gz
Interactive Job
Request a node
srun -p gpu -C gpup100 --gres=gpu:1 --mem=5gb --time=04:00:00 --pty bash
Load the Singularity module that define the path to fastai.
module load singularity
Run fastai
singularity exec --nv -B /scratch $FASTAI python fastaiLessonPETs.py
output:
['Abyssinian', 'Bengal', 'Birman', 'Bombay', 'British_Shorthair', 'Egyptian_Mau', 'Maine_Coon', 'Persian', 'Ragdoll', 'Russian_Blue', 'Siamese', 'Sphynx', 'american_bulldog', 'american_pit_bull_terrier', 'basset_hound', 'beagle', 'boxer', 'chihuahua', 'english_cocker_spaniel', 'english_setter', 'german_shorthaired', 'great_pyrenees', 'havanese', 'japanese_chin', 'keeshond', 'leonberger', 'miniature_pinscher', 'newfoundland', 'pomeranian', 'pug', 'saint_bernard', 'samoyed', 'scottish_terrier', 'shiba_inu', 'staffordshire_bull_terrier', 'wheaten_terrier', 'yorkshire_terrier']
...
epoch train_loss valid_loss error_rate time
0 0.085592 0.160328 0.048714 03:12
1 0.081189 0.147885 0.050744 03:08
2 0.067982 0.149780 0.050744 03:08
Total time: 09:30
Batch Job
Find the job file "fastai.slurm" and submit the job
sbatch fastai.slurm
You will find the outputfiles along with the log file "slurm-<jobid>.out"
References:
[1] fastain.ai - https://www.fast.ai/
[2] fastai Tutorial - https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson1-pets.ipynb
[3] Tutorial Data - http://www.robots.ox.ac.uk/~vgg/data/pets/, http://files.fast.ai/data/examples/