primeqa.ir.dense.dpr_top.dpr.searcher.Options#
- class primeqa.ir.dense.dpr_top.dpr.searcher.Options(rescore_only=False)#
Bases:
primeqa.ir.dense.dpr_top.dpr.dpr_util.DPROptions
Methods
Fill this hyperparameter object from the command line.
Fill this hyperparameter object from the config.
from_dict
Provides json objects for one pass over 'filename'.
when searching for bsize in hyperparameter tuning we need to update the gradient accumulation steps to stay within GPU memory constraints :return:
set_seed
to_dict
- fill_from_args()#
Fill this hyperparameter object from the command line. :return:
- fill_from_config(config)#
Fill this hyperparameter object from the config. :return:
- jsonl_instances(filename: str, *, rand: Optional[random.Random], filter_out: Optional[Callable[[Dict], bool]] = None)#
Provides json objects for one pass over ‘filename’. Only instances for our global rank are returned :param filename: the file or directory of the jsonl dataset :param rand: the random.Random, should be seeded from hypers.seed, None if no shuffling :param filter_out: json objects are passed to this function, True means the instance is excluded :return: this is a generator, it yields json objects
- set_gradient_accumulation_steps()#
when searching for bsize in hyperparameter tuning we need to update the gradient accumulation steps to stay within GPU memory constraints :return: