ksuit.factory.schedule_factory¶
Classes¶
Factory for creating schedules. Handles wrapping into ScheduleWrapper which handles update/epoch based |
Module Contents¶
- class ksuit.factory.schedule_factory.ScheduleFactory(returns_partials=False)¶
Bases:
ksuit.factory.base.FactoryFactory for creating schedules. Handles wrapping into ScheduleWrapper which handles update/epoch based scheduling. Additionally, populates the effective_batch_size and updates_per_epoch to avoid specifying it in the config.
- Parameters:
returns_partials (bool)
- create(schedule_config, **kwargs)¶
Creates a schedule if the schedule is specified as dictionary. If the schedule was already instantiated, it will simply return the existing schedule. If obj_or_kwargs is None, None is returned.
- Parameters:
schedule_config (ksuit.schemas.scheduler.AnyScheduleConfig) – The schedule config or already instantiated schedule.
**kwargs – Additional keyword arguments that are passed to the schedule constructor.
- Returns:
The instantiated schedule.
- Return type:
ksuit.utils.training.ScheduleWrapper | None