immuneML.workflows.instructions.apply_gen_model package¶
Submodules¶
immuneML.workflows.instructions.apply_gen_model.ApplyGenModelInstruction module¶
- class immuneML.workflows.instructions.apply_gen_model.ApplyGenModelInstruction.ApplyGenModelInstruction(method: GenerativeModel = None, reports: list = None, result_path: Path = None, name: str = None, gen_examples_count: int = None)[source]¶
Bases:
GenModelInstruction
ApplyGenModel instruction implements applying generative AIRR models on the sequence level.
This instruction takes as input a trained model (trained in the TrainGenModel instruction) which will be used for generating data and the number of sequences to be generated. It can also produce reports of the applied model and reports of generated sequences.
Specification arguments:
gen_examples_count (int): how many examples (sequences, repertoires) to generate from the applied model
reports (list): list of report ids (defined under definitions/reports) to apply after generating gen_examples_count examples; these can be data reports (to be run on generated examples), ML reports (to be run on the fitted model)
ml_config_path (str): path to the trained model in zip format (as provided by TrainGenModel instruction)
YAML specification:
instructions: my_apply_gen_model_inst: # user-defined instruction name type: ApplyGenModel gen_examples_count: 100 ml_config_path: ./config.zip reports: [data_rep1, ml_rep2]
- run(result_path: Path) GenModelState [source]¶
- class immuneML.workflows.instructions.apply_gen_model.ApplyGenModelInstruction.ApplyGenModelState(result_path: ~pathlib.Path, name: str, gen_examples_count: int, model_path: ~pathlib.Path = None, generated_dataset: ~immuneML.data_model.datasets.Dataset.Dataset = None, exported_datasets: ~typing.Dict[str, ~pathlib.Path] = <factory>, report_results: ~typing.Dict[str, ~typing.List[~immuneML.reports.ReportResult.ReportResult]] = <factory>)[source]¶
Bases:
GenModelState