| 164 /// Only use if running just a single algorithm, as different algorithms have different |
167 /// Only use if running just a single algorithm, as different algorithms have different |
| 165 /// regularisation parameters. Does not affect the algorithms fw and fwrelax. |
168 /// regularisation parameters. Does not affect the algorithms fw and fwrelax. |
| 166 tau0 : Option<F>, |
169 tau0 : Option<F>, |
| 167 |
170 |
| 168 #[arg(long, requires = "algorithm")] |
171 #[arg(long, requires = "algorithm")] |
| |
172 /// Second primal step length parameter override for SlidingPDPS. |
| |
173 /// |
| |
174 /// Only use if running just a single algorithm, as different algorithms have different |
| |
175 /// regularisation parameters. |
| |
176 sigmap0 : Option<F>, |
| |
177 |
| |
178 #[arg(long, requires = "algorithm")] |
| 169 /// Dual step length parameter override for --algorithm. |
179 /// Dual step length parameter override for --algorithm. |
| 170 /// |
180 /// |
| 171 /// Only use if running just a single algorithm, as different algorithms have different |
181 /// Only use if running just a single algorithm, as different algorithms have different |
| 172 /// regularisation parameters. Only affects PDPS. |
182 /// regularisation parameters. Only affects PDPS. |
| 173 sigma0 : Option<F>, |
183 sigma0 : Option<F>, |
| 174 |
184 |
| 175 #[arg(long)] |
185 #[arg(long)] |
| 176 /// Normalised transport step length for sliding_fb. |
186 /// Normalised transport step length for sliding methods. |
| 177 theta0 : Option<F>, |
187 theta0 : Option<F>, |
| 178 |
188 |
| 179 #[arg(long)] |
189 #[arg(long)] |
| 180 /// Transport toleranced wrt. ω |
190 /// Transport toleranced wrt. ω |
| 181 transport_tolerance_omega : Option<F>, |
191 transport_tolerance_omega : Option<F>, |
| 182 |
192 |
| 183 #[arg(long)] |
193 #[arg(long)] |
| 184 /// Transport toleranced wrt. ∇v |
194 /// Transport toleranced wrt. ∇v |
| 185 transport_tolerance_dv : Option<F>, |
195 transport_tolerance_dv : Option<F>, |
| |
196 |
| |
197 #[arg(long)] |
| |
198 /// Transport adaptation factor. Must be in (0, 1). |
| |
199 transport_adaptation : Option<F>, |
| |
200 |
| |
201 #[arg(long)] |
| |
202 /// Minimal step length parameter for sliding methods. |
| |
203 tau0_min : Option<F>, |
| 186 |
204 |
| 187 #[arg(value_enum, long)] |
205 #[arg(value_enum, long)] |
| 188 /// PDPS acceleration, when available. |
206 /// PDPS acceleration, when available. |
| 189 acceleration : Option<pdps::Acceleration>, |
207 acceleration : Option<pdps::Acceleration>, |
| 190 |
208 |
| 191 #[arg(long)] |
209 // #[arg(long)] |
| 192 /// Perform postprocess weight optimisation for saved iterations |
210 // /// Perform postprocess weight optimisation for saved iterations |
| 193 /// |
211 // /// |
| 194 /// Only affects FB, FISTA, and PDPS. |
212 // /// Only affects FB, FISTA, and PDPS. |
| 195 postprocessing : Option<bool>, |
213 // postprocessing : Option<bool>, |
| 196 |
214 |
| 197 #[arg(value_name = "n", long)] |
215 #[arg(value_name = "n", long)] |
| 198 /// Merging frequency, if merging enabled (every n iterations) |
216 /// Merging frequency, if merging enabled (every n iterations) |
| 199 /// |
217 /// |
| 200 /// Only affects FB, FISTA, and PDPS. |
218 /// Only affects FB, FISTA, and PDPS. |
| 244 } |
262 } |
| 245 |
263 |
| 246 for experiment_shorthand in cli.experiments.iter().unique() { |
264 for experiment_shorthand in cli.experiments.iter().unique() { |
| 247 let experiment = experiment_shorthand.get_experiment(&cli.experiment_overrides).unwrap(); |
265 let experiment = experiment_shorthand.get_experiment(&cli.experiment_overrides).unwrap(); |
| 248 let mut algs : Vec<Named<AlgorithmConfig<float>>> |
266 let mut algs : Vec<Named<AlgorithmConfig<float>>> |
| 249 = cli.algorithm.iter() |
267 = cli.algorithm |
| 250 .map(|alg| experiment.algorithm_defaults(*alg, &cli.algoritm_overrides)) |
268 .iter() |
| 251 .collect(); |
269 .map(|alg| alg.to_named( |
| |
270 experiment.algorithm_defaults(*alg) |
| |
271 .unwrap_or_else(|| alg.default_config()) |
| |
272 .cli_override(&cli.algoritm_overrides) |
| |
273 )) |
| |
274 .collect(); |
| 252 for filename in cli.saved_algorithm.iter() { |
275 for filename in cli.saved_algorithm.iter() { |
| 253 let f = std::fs::File::open(filename).unwrap(); |
276 let f = std::fs::File::open(filename).unwrap(); |
| 254 let alg = serde_json::from_reader(f).unwrap(); |
277 let alg = serde_json::from_reader(f).unwrap(); |
| 255 algs.push(alg); |
278 algs.push(alg); |
| 256 } |
279 } |