Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require probes to match input modality of the generator #738

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

jmartin-tech
Copy link
Collaborator

  • test modality for full input match
  • log a warning for probes skipped due to mismatch

More work is likely to be needed so a TODO has been noted. Longer term goal may be to have some compatibility matrix for instance to allow sending text only input to models that support text + image.

Future improvements will likely be be linked with work in #602

* test modality for full input match
* log a warning for probes skipped due to mismatch

Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
@@ -94,6 +94,11 @@ def run(self, model, probes, detectors, evaluator, announce_probe=True) -> None:
logging.debug("harness: probe start for %s", probe.probename)
if not probe:
continue
# TODO: refactor this to allow `compatible` probes instead of direct match
if probe.modality["in"] != model.modality["in"]:
logging.warning("probe skipped due to modality mismatch: %s", probe)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add context to the message

Suggested change
logging.warning("probe skipped due to modality mismatch: %s", probe)
logging.warning("probe skipped due to modality mismatch: %s - model expects %s", (probe, model.modality["in"]))

Copy link
Collaborator

@leondz leondz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor suggestion re: logging informativeness

Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
@jmartin-tech jmartin-tech merged commit 9f3bf35 into NVIDIA:main Jun 17, 2024
4 checks passed
@jmartin-tech jmartin-tech deleted the feature/enforce-modality branch June 17, 2024 16:20
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants