Catalyst 19.06
Catalyst 19.05 -> 19.06
Overall
- docs, docker and travis update (#205, #201, #203)
- Removed dependency on TensorFlow, new tensorboard logs parsing mechanism (#182)
DL
- FP16 & distributed training support, nvidia-apex support (#183, #207)
- PyTorch auto-tracing support (#189)
- logdir autonaming based on
baselogdir
, timestamp and config hash (a141e4c) - 1Cycle PyTorch scheduler (#162)
RL
- on-policy model-free algorithms support, PPO & REINFORCE implementations (#174)
- mongo DB support fix (#190)
- updated samplers, no trajectory length limit now (#196)
Contrib
Improvements and fixes
- optimizer transferring from previous stage support (#181)
- additional checkpoint data support (#184)
--version
feature (#188)
Breaking changes
- all methods with
prepare_*
, that have returned something, renamed toget_*
; Experiment._prepare_logdir
renamed toExperiment._get_logdir
UtilsFactory.prepare_models
renamed toUtilsFactory.process_components
and supports PyTorch model, criterion, optimizer and scheduler now- Previous segmentation models were moved to
catalyst.contrib.models.segmentation.models
:ResNetUnet
andResNetLinknet
per_gpu_batch_size
renamed toper_gpu_scaling
and affects on batch_size and num_workers now
Features examples
Segmentation
from catalyst.contrib.models.segmentation import \
Unet, Linknet, FPNUnet, PSPnet, \
ResnetUnet, ResnetLinknet, ResnetFPNUnet, ResnetPSPnet
Apex
runner = SupervisedRunner()
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
scheduler=scheduler,
fp16=True
...)
or
runner = SupervisedRunner()
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
scheduler=scheduler,
fp16={"opt_level": "O1"} # and other apex.initalize kwargs
...)
Distributed training bash example
#!/usr/bin/env bash
export MASTER_ADDR="127.0.0.1"
export MASTER_PORT=29500
export WORLD_SIZE=2 # number of gpus
RANK=0 LOCAL_RANK=0 catalyst-dl run --config=config.yml --distributed_params/rank=0:int & # gpu 0
sleep 5
RANK=1 LOCAL_RANK=1 catalyst-dl run --config=config.yml --distributed_params/rank=1:int & # gpu 1