Yes, state at the begining of the training is None as it is not defined.
When you attached
trainer.add_event_handler(Events.EPOCH_COMPLETED(every=2), ckpt_handler, to_save)

once every 2 epoch, ckpt_handler is triggered to save what to save. Its argument global_step_transform is an optional callable that

global step transform function to output a desired global step. Input of the function is (engine, event_name). Output of function should be an integer. Default is None, global_step based on attached engine. If provided, uses function output as global_step.

So it is just executed during the training, where trainer’s state is initialized and can be used.
Please, see the docs for info : https://pytorch.org/ignite/handlers.html#ignite.handlers.Checkpoint 4
Hope this helps