hyrax.verbs.lookup#
Attributes#
Classes#
Look up an inference result using the ID of a data member |
Module Contents#
- class Lookup(config)[source]#
Bases:
hyrax.verbs.verb_registry.VerbLook up an inference result using the ID of a data member
Overall initialization for all verbs that saves the config
- static setup_parser(parser: argparse.ArgumentParser)[source]#
Set up our arguments by configuring a subparser
- Parameters:
parser (ArgumentParser) – The sub-parser to configure
- run_cli(args: argparse.Namespace | None = None)[source]#
Entrypoint to Lookup from the CLI.
- Parameters:
args (Optional[Namespace], optional) – The parsed command line arguments
- run(id: str, results_dir: pathlib.Path | str | None = None) numpy.ndarray | None[source]#
Lookup the latent-space representation of a particular ID
Requires the relevant dataset to be configured, and for inference to have been run.
- Parameters:
id (str) – The ID of the input data to look up the inference result
results_dir (str, Optional) – The directory containing the inference results.
- Returns:
The output tensor of the model for the given input.
- Return type:
Optional[np.ndarray]