optimizerService = $optimizer; $this->addOption( 'max-epochs', null, InputOption::VALUE_OPTIONAL, 'maximum number of epochs of optimization', 100 ); $this->addOption( 'v6', null, InputOption::VALUE_NONE, 'train with IPv6 data' ); $this->addOption( 'now', null, InputOption::VALUE_OPTIONAL, 'the current time as timestamp', time() ); $this->registerStatsOption(); } protected function execute(InputInterface $input, OutputInterface $output): int { if (extension_loaded('xdebug')) { $output->writeln('XDebug is active. This will slow down the training processes.'); } // Prevent getting killed by a timeout if (strpos(ini_get('disable_functions'), 'set_time_limit') === false) { set_time_limit(0); } $this->optimizerService->optimize( (int)$input->getOption('max-epochs'), $input->getOption('v6') ? new IpV6Strategy() : new Ipv4Strategy(), (int)$input->getOption('now'), $output ); return 0; } }