Skip to navigation

Train TIMM

Runs on: gpu Dockerfile
First run can take longer while the worker pulls the configured Docker image.

Overview

Trains an image classifier with the timm library straight from two OvalBee datasets. The node downloads them itself and writes the torchvision ImageFolder layout it trains on, one folder per class, inside the task’s own storage.

timm ships hundreds of architectures with pretrained weights, from ResNets to ConvNeXt and vision transformers, so the practical question is which one fits your accuracy and latency budget rather than whether it is available.

The badge shows the best top-1 accuracy reached on the validation split.

Train / val datasets Train TIMM Predict TIMM
  • resnet101
  • resnet101.tv_in1k
  • resnet101.tv2_in1k
  • resnet101_clip
  • resnet101_clip_gap
  • resnet101c
  • resnet101d
  • resnet101s
  • resnet10t
  • resnet14t
  • resnet152
  • resnet152.tv_in1k
  • resnet152.tv2_in1k
  • resnet152c
  • resnet152d
  • resnet152s
  • resnet18
  • resnet18.tv_in1k
  • resnet18.fb_ssl_yfcc100m_ft_in1k
  • resnet18.fb_swsl_ig1b_ft_in1k
  • resnet18d
  • resnet200
  • resnet200d
  • resnet26
  • resnet26d
  • resnet26t
  • resnet32ts
  • resnet33ts
  • resnet34
  • resnet34.tv_in1k
  • resnet34d
  • resnet50
  • resnet50.tv_in1k
  • resnet50.fb_ssl_yfcc100m_ft_in1k
  • resnet50.tv2_in1k
  • resnet50.fb_swsl_ig1b_ft_in1k
  • resnet50_clip
  • resnet50_clip_gap
  • resnet50_gn
  • resnet50_mlp
  • resnet50c
  • resnet50d
  • resnet50s
  • resnet50t
  • resnet50x16_clip
  • resnet50x16_clip_gap
  • resnet50x4_clip
  • resnet50x4_clip_gap
  • resnet50x64_clip
  • resnet50x64_clip_gap
  • resnet51q
  • resnet61q
  • resnetaa101d
  • resnetaa34d
  • resnetaa50
  • resnetaa50d
  • resnetblur101d
  • resnetblur18
  • resnetblur50
  • resnetblur50d
  • resnetrs101
  • resnetrs152
  • resnetrs200
  • resnetrs270
  • resnetrs350
  • resnetrs420
  • resnetrs50
  • resnetv2_101
  • resnetv2_101d
  • resnetv2_101x1_bit
  • resnetv2_101x3_bit
  • resnetv2_152
  • resnetv2_152d
  • resnetv2_152x2_bit
  • resnetv2_152x4_bit
  • resnetv2_18
  • resnetv2_18d
  • resnetv2_34
  • resnetv2_34d
  • resnetv2_50
  • resnetv2_50d
  • resnetv2_50d_evos
  • resnetv2_50d_frn
  • resnetv2_50d_gn
  • resnetv2_50t
  • resnetv2_50x1_bit
  • resnetv2_50x3_bit
  • efficientnetv2_l
  • efficientnetv2_m
  • efficientnetv2_rw_m
  • efficientnetv2_rw_s
  • efficientnetv2_rw_t
  • efficientnetv2_s
  • efficientnetv2_xl
  • gc_efficientnetv2_rw_t
  • tf_efficientnetv2_b0
  • tf_efficientnetv2_b1
  • tf_efficientnetv2_b2
  • tf_efficientnetv2_b3
  • tf_efficientnetv2_l
  • tf_efficientnetv2_m
  • tf_efficientnetv2_s
  • tf_efficientnetv2_xl
  • efficientnet_b0
  • efficientnet_b1
  • efficientnet_b2
  • efficientnet_b3
  • efficientnet_b4
  • efficientnet_b5
  • efficientnet_b6
  • efficientnet_b7
  • tf_efficientnet_b0
  • tf_efficientnet_b1
  • tf_efficientnet_b2
  • tf_efficientnet_b3
  • tf_efficientnet_b4
  • tf_efficientnet_b5
  • tf_efficientnet_b6
  • tf_efficientnet_b7
  • mobilenetv3_large_075
  • mobilenetv3_large_100
  • mobilenetv3_large_150d
  • mobilenetv3_rw
  • mobilenetv3_small_050
  • mobilenetv3_small_075
  • mobilenetv3_small_100
  • convnext_atto
  • convnext_atto_ols
  • convnext_atto_rms
  • convnext_base
  • convnext_base.dinov3_lvd1689m
  • convnext_femto
  • convnext_femto_ols
  • convnext_large
  • convnext_large.dinov3_lvd1689m
  • convnext_large_mlp
  • convnext_nano
  • convnext_nano_ols
  • convnext_pico
  • convnext_pico_ols
  • convnext_small
  • convnext_small.dinov3_lvd1689m
  • convnext_tiny
  • convnext_tiny.dinov3_lvd1689m
  • convnext_tiny_hnf
  • convnext_xlarge
  • convnext_xxlarge
  • convnext_zepto_rms
  • convnext_zepto_rms_ols
  • convnextv2_atto
  • convnextv2_base
  • convnextv2_femto
  • convnextv2_huge
  • convnextv2_large
  • convnextv2_nano
  • convnextv2_pico
  • convnextv2_small
  • convnextv2_tiny
  • vit_7b_patch16_dinov3
  • vit_base_patch14_dinov2
  • vit_base_patch14_reg4_dinov2
  • vit_base_patch16_18x2_224
  • vit_base_patch16_224
  • vit_base_patch16_224.mae
  • vit_base_patch16_224_miil
  • vit_base_patch16_384
  • vit_base_patch16_clip_224
  • vit_base_patch16_clip_224.dfn2b
  • vit_base_patch16_clip_224.laion400m_e32
  • vit_base_patch16_clip_224.metaclip_2pt5b
  • vit_base_patch16_clip_224.metaclip_400m
  • vit_base_patch16_clip_384
  • vit_base_patch16_clip_quickgelu_224
  • vit_base_patch16_clip_quickgelu_224.metaclip_2pt5b
  • vit_base_patch16_clip_quickgelu_224.metaclip_400m
  • vit_base_patch16_dinov3
  • vit_base_patch16_dinov3_qkvb
  • vit_base_patch16_gap_224
  • vit_base_patch16_plus_240
  • vit_base_patch16_plus_clip_240
  • vit_base_patch16_reg4_gap_256
  • vit_base_patch16_rope_224
  • vit_base_patch16_rope_ape_224
  • vit_base_patch16_rope_mixed_224
  • vit_base_patch16_rope_mixed_ape_224
  • vit_base_patch16_rope_reg1_gap_256
  • vit_base_patch16_rpn_224
  • vit_base_patch16_siglip_224
  • vit_base_patch16_siglip_256
  • vit_base_patch16_siglip_384
  • vit_base_patch16_siglip_512
  • vit_base_patch16_siglip_gap_224
  • vit_base_patch16_siglip_gap_256
  • vit_base_patch16_siglip_gap_384
  • vit_base_patch16_siglip_gap_512
  • vit_base_patch16_xp_224
  • vit_base_patch32_224
  • vit_base_patch32_384
  • vit_base_patch32_clip_224
  • vit_base_patch32_clip_224.laion400m_e32
  • vit_base_patch32_clip_224.metaclip_2pt5b
  • vit_base_patch32_clip_224.metaclip_400m
  • vit_base_patch32_clip_256
  • vit_base_patch32_clip_384
  • vit_base_patch32_clip_448
  • vit_base_patch32_clip_quickgelu_224
  • vit_base_patch32_clip_quickgelu_224.laion400m_e32
  • vit_base_patch32_clip_quickgelu_224.metaclip_2pt5b
  • vit_base_patch32_clip_quickgelu_224.metaclip_400m
  • vit_base_patch32_plus_256
  • vit_base_patch32_siglip_256
  • vit_base_patch32_siglip_gap_256
  • vit_base_patch8_224
  • vit_betwixt_patch16_gap_256
  • vit_betwixt_patch16_reg1_gap_256
  • vit_betwixt_patch16_reg4_gap_256
  • vit_betwixt_patch16_reg4_gap_384
  • vit_betwixt_patch16_rope_reg4_gap_256
  • vit_betwixt_patch32_clip_224
  • vit_dlittle_patch16_reg1_gap_256
  • vit_dpwee_patch16_reg1_gap_256
  • vit_dwee_patch16_reg1_gap_256
  • vit_giant_patch14_224
  • vit_giant_patch14_clip_224
  • vit_giant_patch14_dinov2
  • vit_giant_patch14_reg4_dinov2
  • vit_giant_patch16_gap_224
  • vit_giantopt_patch16_siglip_256
  • vit_giantopt_patch16_siglip_384
  • vit_giantopt_patch16_siglip_gap_256
  • vit_giantopt_patch16_siglip_gap_384
  • vit_gigantic_patch14_224
  • vit_gigantic_patch14_clip_224
  • vit_gigantic_patch14_clip_224.metaclip2_worldwide
  • vit_gigantic_patch14_clip_224.metaclip_2pt5b
  • vit_gigantic_patch14_clip_378
  • vit_gigantic_patch14_clip_quickgelu_224
  • vit_huge_patch14_224
  • vit_huge_patch14_224.mae
  • vit_huge_patch14_clip_224
  • vit_huge_patch14_clip_224.dfn5b
  • vit_huge_patch14_clip_224.metaclip2_worldwide
  • vit_huge_patch14_clip_224.metaclip_2pt5b
  • vit_huge_patch14_clip_224.metaclip_altogether
  • vit_huge_patch14_clip_336
  • vit_huge_patch14_clip_378
  • vit_huge_patch14_clip_378.metaclip2_worldwide
  • vit_huge_patch14_clip_quickgelu_224
  • vit_huge_patch14_clip_quickgelu_224.dfn5b
  • vit_huge_patch14_clip_quickgelu_378
  • vit_huge_patch14_gap_224
  • vit_huge_patch14_xp_224
  • vit_huge_patch16_gap_448
  • vit_huge_plus_patch16_dinov3
  • vit_huge_plus_patch16_dinov3_qkvb
  • vit_intern300m_patch14_448
  • vit_intern300m_patch14_448.ogvl_dist
  • vit_large_patch14_224
  • vit_large_patch14_clip_224
  • vit_large_patch14_clip_224.apple_mclip2_dfndr2b
  • vit_large_patch14_clip_224.dfn2b
  • vit_large_patch14_clip_224.dfn2b_s39b
  • vit_large_patch14_clip_224.laion400m_e32
  • vit_large_patch14_clip_224.metaclip_2pt5b
  • vit_large_patch14_clip_224.metaclip_400m
  • vit_large_patch14_clip_336
  • vit_large_patch14_clip_quickgelu_224
  • vit_large_patch14_clip_quickgelu_224.dfn2b
  • vit_large_patch14_clip_quickgelu_224.metaclip_2pt5b
  • vit_large_patch14_clip_quickgelu_224.metaclip_400m
  • vit_large_patch14_clip_quickgelu_336
  • vit_large_patch14_dinov2
  • vit_large_patch14_reg4_dinov2
  • vit_large_patch14_xp_224
  • vit_large_patch16_224
  • vit_large_patch16_224.mae
  • vit_large_patch16_384
  • vit_large_patch16_dinov3
  • vit_large_patch16_dinov3_qkvb
  • vit_large_patch16_rope_224
  • vit_large_patch16_rope_ape_224
  • vit_large_patch16_rope_mixed_224
  • vit_large_patch16_rope_mixed_ape_224
  • vit_large_patch16_siglip_256
  • vit_large_patch16_siglip_384
  • vit_large_patch16_siglip_512
  • vit_large_patch16_siglip_gap_256
  • vit_large_patch16_siglip_gap_384
  • vit_large_patch16_siglip_gap_512
  • vit_large_patch32_224
  • vit_large_patch32_384
  • vit_little_patch16_reg1_gap_256
  • vit_little_patch16_reg4_gap_256
  • vit_medium_patch16_clip_224
  • vit_medium_patch16_gap_240
  • vit_medium_patch16_gap_256
  • vit_medium_patch16_gap_384
  • vit_medium_patch16_reg1_gap_256
  • vit_medium_patch16_reg4_gap_256
  • vit_medium_patch16_rope_reg1_gap_256
  • vit_medium_patch32_clip_224
  • vit_mediumd_patch16_reg4_gap_256
  • vit_mediumd_patch16_reg4_gap_384
  • vit_mediumd_patch16_rope_reg1_gap_256
  • vit_pe_core_base_patch16_224
  • vit_pe_core_gigantic_patch14_448
  • vit_pe_core_large_patch14_336
  • vit_pe_core_small_patch16_384
  • vit_pe_core_tiny_patch16_384
  • vit_pe_lang_gigantic_patch14_448
  • vit_pe_lang_large_patch14_448
  • vit_pe_spatial_base_patch16_512
  • vit_pe_spatial_gigantic_patch14_448
  • vit_pe_spatial_large_patch14_448
  • vit_pe_spatial_small_patch16_512
  • vit_pe_spatial_tiny_patch16_512
  • vit_pwee_patch16_reg1_gap_256
  • vit_relpos_base_patch16_224
  • vit_relpos_base_patch16_cls_224
  • vit_relpos_base_patch16_clsgap_224
  • vit_relpos_base_patch16_plus_240
  • vit_relpos_base_patch16_rpn_224
  • vit_relpos_base_patch32_plus_rpn_256
  • vit_relpos_medium_patch16_224
  • vit_relpos_medium_patch16_cls_224
  • vit_relpos_medium_patch16_rpn_224
  • vit_relpos_small_patch16_224
  • vit_relpos_small_patch16_rpn_224
  • vit_small_patch14_dinov2
  • vit_small_patch14_reg4_dinov2
  • vit_small_patch16_18x2_224
  • vit_small_patch16_224
  • vit_small_patch16_36x1_224
  • vit_small_patch16_384
  • vit_small_patch16_dinov3
  • vit_small_patch16_dinov3_qkvb
  • vit_small_patch16_rope_224
  • vit_small_patch16_rope_ape_224
  • vit_small_patch16_rope_mixed_224
  • vit_small_patch16_rope_mixed_ape_224
  • vit_small_patch32_224
  • vit_small_patch32_384
  • vit_small_patch8_224
  • vit_small_plus_patch16_dinov3
  • vit_small_plus_patch16_dinov3_qkvb
  • vit_so150m2_patch16_reg1_gap_256
  • vit_so150m2_patch16_reg1_gap_384
  • vit_so150m2_patch16_reg1_gap_448
  • vit_so150m_patch16_reg4_gap_256
  • vit_so150m_patch16_reg4_gap_384
  • vit_so150m_patch16_reg4_map_256
  • vit_so400m_patch14_siglip_224
  • vit_so400m_patch14_siglip_378
  • vit_so400m_patch14_siglip_384
  • vit_so400m_patch14_siglip_gap_224
  • vit_so400m_patch14_siglip_gap_378
  • vit_so400m_patch14_siglip_gap_384
  • vit_so400m_patch14_siglip_gap_448
  • vit_so400m_patch14_siglip_gap_896
  • vit_so400m_patch16_siglip_256
  • vit_so400m_patch16_siglip_384
  • vit_so400m_patch16_siglip_512
  • vit_so400m_patch16_siglip_gap_256
  • vit_so400m_patch16_siglip_gap_384
  • vit_so400m_patch16_siglip_gap_512
  • vit_srelpos_medium_patch16_224
  • vit_srelpos_small_patch16_224
  • vit_tiny_patch16_224
  • vit_tiny_patch16_384
  • vit_wee_patch16_reg1_gap_256
  • vit_xsmall_patch16_clip_224
  • densenet121
  • densenet161
  • densenet169
  • densenet201
  • inception_v3
  • inception_v4
  • inception_resnet_v2
  • xception
  • xception41
  • xception65
  • swin_tiny_patch4_window7_224
  • swin_small_patch4_window7_224
  • swin_base_patch4_window7_224
  • swin_large_patch4_window7_224
  • deit_tiny_patch16_224
  • deit_small_patch16_224
  • deit_base_patch16_224
  • deit_base_patch16_384
  • resnext50_32x4d
  • resnext50_32x4d.tv_in1k
  • resnext50_32x4d.tv2_in1k
  • resnext50_32x4d.fb_ssl_yfcc100m_ft_in1k
  • resnext50_32x4d.fb_swsl_ig1b_ft_in1k
  • resnext101_32x4d
  • resnext101_32x4d.fb_ssl_yfcc100m_ft_in1k
  • resnext101_32x4d.fb_swsl_ig1b_ft_in1k
  • resnext101_32x8d
  • resnext101_32x8d.fb_ssl_yfcc100m_ft_in1k
  • resnext101_32x8d.fb_wsl_ig1b_ft_in1k
  • resnext101_32x8d.fb_swsl_ig1b_ft_in1k
  • wide_resnet50_2
  • wide_resnet50_2.tv_in1k
  • wide_resnet50_2.tv2_in1k
  • wide_resnet101_2
  • regnetx_002
  • regnetx_004
  • regnetx_008
  • regnetx_008.tv2_in1k
  • regnetx_016
  • regnetx_016.tv2_in1k
  • regnetx_032
  • regnetx_032.tv2_in1k
  • regnetx_040
  • regnetx_080
  • regnetx_080.tv2_in1k
  • regnetx_120
  • regnetx_160
  • regnetx_160.tv2_in1k
  • regnetx_320
  • regnetx_320.tv2_in1k
  • regnety_002
  • regnety_004
  • regnety_004.tv2_in1k
  • regnety_008
  • regnety_016
  • regnety_016.tv2_in1k
  • regnety_032
  • regnety_032.pycls_in1k
  • regnety_032.tv2_in1k
  • regnety_040
  • regnety_040.pycls_in1k
  • regnety_080
  • regnety_080.pycls_in1k
  • regnety_120
  • regnety_120.pycls_in1k
  • regnety_160
  • regnety_160.pycls_in1k
  • regnety_160.tv2_in1k
  • regnety_160.swag_lc_in1k
  • regnety_160.swag_ft_in1k
  • regnety_320
  • regnety_320.seer
  • regnety_320.tv2_in1k
  • regnety_320.seer_ft_in1k
  • regnety_320.swag_lc_in1k
  • regnety_320.swag_ft_in1k

Each family carries the licence of its weights, read from their model card, and a set of weights under another licence than the rest of its architecture’s is a family of its own, named <architecture>.<weights>. Most are Apache-2.0, MIT or BSD-3-Clause. The _dinov3 architectures and the dinov3_lvd1689m ConvNeXt weights are built with DINOv3 and used under Meta’s DINOv3 License. The ConvNeXt V2 FCMAE, SSL/SWSL/WSL, SWAG, MAE, MetaCLIP and I-JEPA weights are CC-BY-NC-4.0, the SEER ones are under Meta’s SEER License, and Apple’s DFN and MobileCLIP 2 weights under its Machine Learning Research Model License: all of these allow non-commercial use only. The catalog marks them Non-commercial, and a run that starts from one names its licence in the log.

Prerequisites

RequirementWhat you need
GPU workerA worker with a GPU.
Train datasetA dataset whose images carry an image-level tag naming their class. The tag names become the classes.
Validation datasetA second dataset tagged the same way. It is required: timm picks its best checkpoint by validation top-1. Split one dataset in two with the Train/Val split node.
A model to fine-tuneA model of this workspace, picked in Model. Create one from the picker to copy an architecture in from the zoo.
📁 dataset/
├── 📁 train/
│ ├── 📁 cat/
│ │ └── 📄 cat_001.jpg
│ └── 📁 dog/
│ └── 📄 dog_001.jpg
└── 📁 val/
├── 📁 cat/
└── 📁 dog/

Each image goes into the folder named after its image-level tag. An image with no such tag is skipped, and one with several keeps the first. This is the torchvision ImageFolder layout. A class that appears only in the validation dataset is dropped — its index would fall outside the trained class list.

The tree is rebuilt on every run in the task’s own storage and is gone when the run ends, so nothing downstream can point at it.

How it works

1

Downloads both datasets and writes them as ImageFolder splits.

2

Takes the train split’s classes as the model’s output order, sorted the way timm sorts folder names (ignoring case, numbers by value, so class2 comes before class10), and hands timm that class-to-index map, so training, validation, the saved config.json and predictions all number the classes alike. Then builds the training config from the selected architecture and your overrides.

3

Trains with timm, writing metrics and TensorBoard events, and publishing the report as it goes. Each time the metric the run selects on improves - validation top-1 unless eval_metric names another - the weights go out as model.safetensors with a config.json naming the architecture, the classes in output order, and the input preprocessing. At the end of the first epoch, and then at an epoch’s end at most every two minutes, a checkpoint of the run goes into the version, which a run that continues the version starts from.

4

Uploads them and creates the model asset that owns them, recording the architecture, classes, and the top-1 accuracy of the epoch whose weights it carries.

FAQ

No. Wire the datasets straight in — the node converts them itself. The datasets are read, never modified.

On the model asset. The run writes its weights to the task’s own storage, which is discarded with the container, so the node uploads them and creates the asset before it finishes.

Yes. Its model.safetensors and config.json are attached to it, so Predict, the export nodes and Evaluate can use it directly.

timm evaluates after every epoch and keeps the weights with the best validation top-1. With no validation split there is no metric to select on and the report has nothing to show, so the node stops before downloading anything.

Yes. The report is published early and keeps updating, so charts and checkpoints appear as they are produced rather than only at the end.

The version is created before training starts and receives the best weights so far as the run goes. At the end of the first epoch, and then at an epoch’s end at most every two minutes, the node also saves a checkpoint into the version: the network, the optimizer, the position in the learning-rate schedule, the EMA weights, the mixed-precision scaler, the best top-1 so far and the results of the epochs so far, with the best weights and logs as of that epoch. Training never waits for a checkpoint’s upload, and no new checkpoint starts while one uploads, so a run that is killed loses the training since its last checkpoint that finished uploading: about one epoch or two minutes, whichever is longer, plus the time a checkpoint takes to upload. A run that stops after its first checkpoint leaves the version Incomplete: the model pickers offer it with its best weights so far, marked as not fully trained, and running this node with that version in Model (Latest picks it while it is the newest) continues the run from its last checkpoint into the same version, with the settings it started with, through the rest of its schedule. It shuffles and augments its images afresh, so its losses and accuracy do not repeat the numbers an uninterrupted run would have shown. The run’s last epoch is not a checkpoint, so a run interrupted after it repeats that epoch. On Kubernetes, a run whose machine was taken away is retried and continues from its last checkpoint by itself. A run that stops before its first checkpoint marks its version failed, and it isn’t offered in the model pickers.

Set seed in Hyperparameters to choose the run’s seed (including 0; the default is 42). It seeds the initialization, the shuffling and the augmentations, timm’s and Albumentations’ alike. A run that continues from a checkpoint is seeded from that seed and the epoch it continues at, so it does not repeat the shuffles and augmentations of the run’s first epochs.

A run that continues an incomplete version takes the settings that training started with, and the node first compares them with the checkpoint. It refuses, naming each difference, when the hyperparameters (epochs included), the Albumentations pipeline, the classes, the datasets, the architecture or the timm version differ: a newer image of the node can train with another timm. To train longer or with other settings, start from a fully trained version, or save the unfinished one as a new version and train from that.

resnet50 is the default and a sound baseline. Move to an EfficientNet or MobileNet variant when the model has to be small or fast, and to ConvNeXt or a vision transformer when you have enough data to justify the extra capacity.

The image-level tags in the train dataset, sorted alphabetically. That sort is the model’s output order, so the validation dataset has to use the same tag names.

When your images vary in ways timm’s default pipeline does not simulate, such as weather, blur, or sensor artefacts. It replaces the standard augmentations rather than adding to them, so a weak custom pipeline can score worse than leaving it off.

Usually the tags or the config. Both datasets need image-level classification tags, the validation dataset needs at least one image in a training class, and Hyperparameters has to be a valid YAML mapping whose keys the trainer accepts.

Inputs

Train dataset
datasetRequired

Dataset to train on. Each image’s class comes from its image-level tag, and the tag names become the class list. Key: TRAIN_DATASET.

Validation dataset
datasetRequired

Dataset to validate on after every epoch. Required - timm selects its best checkpoint by validation accuracy. Its images must carry the same image-level tags, classes the train dataset does not have are dropped. Key: VAL_DATASET.

Model
modelRequired

Model to fine-tune. A version copied from the zoo trains from the published weights of its tag, downloaded and checked against their SHA-256. One from an earlier run continues from its weights. The weights are loaded through the safe-weights check, so with the policy on a pickle is refused until it is converted. The run is registered as a new version of this model unless Destination Model names another one. When the version picked is not fully trained (Latest picks one when it is the newest), the run continues that training with the settings it started with, not the ones set here. Key: MODEL.

Destination model
model

Where the trained version is registered, when it should not go to the model being trained. Leave empty to add the version to the Model above. Key: DESTINATION_MODEL.

Hyperparameters
yamlRequired

Training settings passed to timm - epochs, batch size, optimizer, learning rate schedule and augmentation strength. Each setting is checked before the run starts, and a name timm has no such setting for is refused rather than ignored. The architecture, the starting weights and the directories a run reads and writes come from the inputs above, so a setting naming weights, a file, a URL or a module to import is refused too. Key: HYPERPARAMETERS.

Albumentations augmentations
booleanDefaults to falseRequired

Replace timm’s built-in augmentation pipeline with a custom Albumentations pipeline. When off, training uses the standard timm augmentations from Hyperparameters. Key: USE_ALBUMENTATIONS.

Augmentations
yamlRequired

Albumentations training pipeline as a YAML list of transforms (name plus params), applied top to bottom on the uint8 RGB image. Include a Resize where you want it. Scaling and normalization are added afterwards, so do not add Normalize or ToTensorV2. Validation always uses Resize only. Any albumentations transform works, and containers such as OneOf carry a nested transforms: list. Visible when USE_ALBUMENTATIONS is True. Key: AUGMENTATIONS.

Outputs

Report Asset
report

ID of the asset containing live training report. Shown as an artifact. Key: REPORT_ID.

Model
model

Reference to the registry version this run produced, as &lt;model id&gt;@&lt;version id&gt;. It wires into the Model input of a predict, evaluate or export node and pins it to exactly these weights. Empty when the run could not be registered. Shown as an artifact. Key: MODEL.

Best Top-1
string

Best validation top-1 accuracy shown as a badge on the node. Shown on the node as a badge. Key: BEST_TOP1.

Models and configuration

Model is both what training starts from and where its result is filed: the run adds a version to that model. A version copied from the zoo has no weights of its own, so the run trains from timm’s own ImageNet weights for that architecture. One produced by an earlier run continues from its checkpoint, and the new version records it as its parent.

Set Destination Model to file the result elsewhere — the trained version is created there instead, and Model is then only the starting weights. Both pickers list timm models of this workspace, with their ready versions and their incomplete ones, marked as not fully trained.

Hyperparameters is the timm training config as YAML: epochs, batch size, learning rate, optimizer, and scheduler. Removing a key restores the timm default rather than disabling it.

With mixup_off_epoch set, mixup and CutMix stop at that epoch. timm’s own training script keeps them on to the end whenever its data-loading workers do the mixing, as they do by default; this node starts the workers afresh every epoch instead, so that they stop, and use_multi_epochs_loader then has no effect.

Albumentations augmentations replaces timm’s built-in augmentation pipeline with the one in Augmentations. Leave it off to keep the standard pipeline, and turn it on when your domain needs transforms timm does not offer, such as weather or sensor noise.

Report

The report appears near the start of the run and updates as training produces results. It opens in the preview widget on the node.

SectionWhat it shows
OverviewThe architecture, configured epochs, elapsed time, dataset sizes, and classes.
Evaluation ResultsTop-1 and top-5 accuracy on the validation split.
Training PlotsLoss, accuracy, and learning-rate series across epochs.
TensorBoardThe raw TensorBoard event stream.
ArtifactsThe checkpoints written so far, and the model asset panel once the run finishes.
ClassesThe class names and the output index each one maps to.
HyperparametersThe config the run actually used.
How to Use the Trained ModelA short local example that loads the checkpoint and classifies an image.

Runtime

The node runs in its own GPU container. Memory use follows the architecture, the input size, and the batch size, so a model that will not fit is the first thing to check when a run dies early.

The dataset and the checkpoints both live in the container’s own storage, so disk has to hold a copy of both datasets plus the checkpoints the run keeps. Re-running downloads the images again.

The first run takes longer while the worker pulls the image and downloads pretrained weights.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Train TIMM",
"description": "Train classification model using pytorch-image-models (timm) library.",
"category": "Train",
"namespace": null,
"templateKey": "models/timm/train_timm",
"version": "v1",
"inputs": [
{
"key": "TRAIN_DATASET",
"label": "Train dataset",
"type": "dataset",
"description": "Dataset to train on. Each image's class comes from its image-level tag, and the tag names become the class list.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"creatable": false
}
},
{
"key": "VAL_DATASET",
"label": "Validation dataset",
"type": "dataset",
"description": "Dataset to validate on after every epoch. Required - timm selects its best checkpoint by validation accuracy. Its images must carry the same image-level tags; classes the train dataset does not have are dropped.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"creatable": false
}
},
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Model to fine-tune. A version copied from the zoo trains from the published weights of its tag, downloaded and checked against their SHA-256. One from an earlier run continues from its weights. The weights are loaded through the safe-weights check, so with the policy on a pickle is refused until it is converted. The run is registered as a new version of this model unless Destination Model names another one. When the version picked is not fully trained (Latest picks one when it is the newest), the run continues that training with the settings it started with, not the ones set here.\n",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"scope": "my",
"framework": "timm",
"task_type": "classification",
"include_incomplete_versions": true
}
},
{
"key": "DESTINATION_MODEL",
"label": "Destination model",
"type": "model",
"description": "Where the trained version is registered, when it should not go to the model being trained. Leave empty to add the version to the Model above.\n",
"required": false,
"default": null,
"visibleWhen": null,
"options": {
"scope": "my",
"framework": "timm",
"task_type": "classification"
}
},
{
"key": "HYPERPARAMETERS",
"label": "Hyperparameters",
"type": "yaml",
"description": "Training settings passed to timm - epochs, batch size, optimizer, learning rate schedule and augmentation strength. Each setting is checked before the run starts, and a name timm has no such setting for is refused rather than ignored. The architecture, the starting weights and the directories a run reads and writes come from the inputs above, so a setting naming weights, a file, a URL or a module to import is refused too.\n",
"required": true,
"default": "# Model\nimg_size: null # override model default input size\n\n# Training\nepochs: 20\nbatch_size: 8\nvalidation_batch_size: 8\nworkers: 4\n\n# Optimizer\nopt: adam\nlr: 0.001\nweight_decay: 2.0e-5\nmomentum: 0.9 # only for sgd\nclip_grad: null # gradient clipping norm, null = disabled\n\n# LR schedule\nsched: cosine\nwarmup_epochs: 5\nwarmup_lr: 1.0e-5\nmin_lr: 1.0e-6\ncooldown_epochs: 0\ndecay_rate: 0.1 # for step/multistep scheduler\n\n# Regularization\ndrop: 0.0 # dropout rate\ndrop_path: null # stochastic depth, null = disabled\nsmoothing: 0.1 # label smoothing\n\n# Augmentation\nhflip: 0.5\nvflip: 0.0\ncolor_jitter: 0.4\naa: null # AutoAugment: \"rand-m9-mstd0.5-inc1\" or null\n\n# Mixup / CutMix\nmixup: 0.0 # mixup alpha, 0 = disabled\ncutmix: 0.0 # cutmix alpha, 0 = disabled\n\n# EMA\nmodel_ema: false\nmodel_ema_decay: 0.9998\n\n# Mixed precision\namp: true\namp_dtype: float16",
"visibleWhen": null
},
{
"key": "USE_ALBUMENTATIONS",
"label": "Albumentations augmentations",
"type": "boolean",
"description": "Replace timm's built-in augmentation pipeline with a custom Albumentations pipeline. When off, training uses the standard timm augmentations from Hyperparameters.",
"required": true,
"default": false,
"visibleWhen": null
},
{
"key": "AUGMENTATIONS",
"label": "Augmentations",
"type": "yaml",
"description": "Albumentations training pipeline as a YAML list of transforms (name plus params), applied top to bottom on the uint8 RGB image. Include a Resize where you want it. Scaling and normalization are added afterwards, so do not add Normalize or ToTensorV2. Validation always uses Resize only. Any albumentations transform works, and containers such as OneOf carry a nested `transforms:` list.",
"required": true,
"default": "# Albumentations train pipeline (albumentations 1.4.24). Applied top-to-bottom on the uint8 RGB crop.\n# The node adds /255 + normalize (model mean/std) AFTER this list - do NOT add Normalize / ToTensorV2.\n# Any albumentations transform name is supported. Active list below = the report's `full_aug_medium` set.\n\n- name: Resize\n height: 192\n width: 192\n- name: OneOf\n p: 0.6\n transforms:\n - {name: GaussianBlur, blur_limit: [3, 11], p: 1.0}\n - {name: MotionBlur, blur_limit: [5, 15], p: 1.0}\n- {name: GaussNoise, var_limit: [0.01, 0.05], p: 0.4}\n- {name: Perspective, scale: [0.05, 0.12], p: 0.5}\n- {name: ShiftScaleRotate, shift_limit: 0.08, scale_limit: 0.25, rotate_limit: 20, border_mode: 0, p: 0.6}\n- {name: ColorJitter, brightness: 0.3, contrast: 0.3, saturation: 0.15, hue: 0.0, p: 0.5}\n\n# More available transforms (uncomment / adjust). Flips are intentionally omitted - a\n# mirrored or upside-down digit loses its identity.\n# - {name: RandomBrightnessContrast, brightness_limit: 0.2, contrast_limit: 0.2, p: 0.5}\n# - {name: HueSaturationValue, hue_shift_limit: 10, sat_shift_limit: 20, val_shift_limit: 10, p: 0.4}\n# - {name: RandomGamma, gamma_limit: [80, 120], p: 0.3}\n# - {name: CLAHE, clip_limit: 4.0, p: 0.3}\n# - {name: Sharpen, p: 0.2}\n# - {name: Downscale, scale_range: [0.5, 0.9], p: 0.2}\n# - {name: ImageCompression, quality_range: [50, 90], p: 0.3}\n# - {name: CoarseDropout, num_holes_range: [1, 3], hole_height_range: [16, 48], hole_width_range: [16, 48], p: 0.3} # ranges are pixels in albumentations 1.4.x\n# - {name: RandomShadow, p: 0.2}",
"visibleWhen": {
"key": "USE_ALBUMENTATIONS",
"operator": "equals",
"value": true
}
}
],
"outputs": [
{
"key": "REPORT_ID",
"label": "Report Asset",
"type": "report",
"description": "ID of the asset containing live training report.",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Reference to the registry version this run produced, as `<model id>@<version id>`. It wires into the Model input of a predict, evaluate or export node and pins it to exactly these weights. Empty when the run could not be registered.\n",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "BEST_TOP1",
"label": "Best Top-1",
"type": "string",
"description": "Best validation top-1 accuracy shown as a badge on the node.",
"artifact": false,
"badge": true,
"badgeOpens": null,
"hidden": false
}
],
"runtime": {
"type": "docker",
"devices": [
"gpu"
],
"dockerImage": "ovalbee/node-worker-cuda-dev:0.0.26"
},
"widgets": {
"widget": {
"id": "report-preview",
"settings": {
"reportAsset": {
"type": "variable",
"value": "self.outputs.REPORT_ID"
},
"name": {
"type": "input",
"value": "Open training report"
}
}
}
}
}

References