MultiMadnisTraining

class MultiMadnisTraining

Runs MadnisTraining for every subprocess of a process, with combined progress reporting.

Public Functions

MultiMadnisTraining(ContextPtr generator_context, ContextPtr optimizer_context, const std::vector<TrainingArgs> &training_args, Verbosity verbosity = Verbosity::log, std::shared_ptr<StatusFile> status_file = nullptr, std::optional<std::uint64_t> seed = std::nullopt)
Parameters:
  • generator_context – Context the sampling runtimes run on.

  • optimizer_context – Context the trained globals and optimizers live on.

  • training_args – One entry per subprocess.

  • verbosity – Progress-reporting verbosity.

  • status_file – Optional status file progress is periodically written to.

  • seed – Top-level run seed (reusing the run card’s own seed, also used by build_event_generator()); each subprocess’s MadnisTraining gets a channel_index_offset slice of this seed’s stream so their derived seeds don’t collide.

void train()

Train every subprocess to completion.

inline nested_vector2<std::size_t> active_channels() const

Active channel indices of every subprocess; see MadnisTraining::active_channels.

struct TrainingArgs

One subprocess’s MadnisTraining constructor arguments, except the context, seed and channel-index offset, which MultiMadnisTraining assigns itself.

Public Members

MadnisTraining::Config config
std::vector<std::shared_ptr<Integrand>> integrands
std::optional<ChannelWeightNetwork> cwnet