from allennlp.common.params import Params params = Params({"learning_rate": 0.001, "batch_size": 32})
batch_size = params.get("batch_size")
params["learning_rate"] = 0.0005
params1 = Params({"learning_rate": 0.001}) params2 = Params({"batch_size": 32}) params = params1 + params2
with open("config.json") as f: params = Params.from_file(f)