# -*- coding: utf-8 -*-
import json
import yaml
from argparse import ArgumentParser

p = ArgumentParser()
p.add_argument("json_file")
fname = p.parse_args().json_file
 
hp = json.load(open(fname))["params"]
to_round = ["H0", "H1", "S", "analytical_pi_updates",
            "analytical_sigma_updates", "batch_size", "crossover",
            "epochs_per_cycle", "n_children", "n_generations", "n_parents"]
for k in to_round:
    hp[k] = round(hp[k])

print(yaml.dump(hp))
