Skip to content

Commit

Permalink
Adapt phrasing of doc string and error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein committed Aug 1, 2024
1 parent ead1e30 commit 7bf5258
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metalearners/metalearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,14 +1190,16 @@ def _validate_onnx_models(
"""Validates that the converted ONNX models are correct.
Specifically it validates the following:
* The ``necessary_models`` are present in the ``models``` dictionary
* The ``necessary_models`` are equal to the keys of the ``models``` dictionary
* The number of models for each model matches the cardinality in the MetaLearner
* All ONNX have the same input format
* The models with ``"predict"`` as ``predict_method`` have only one output
* The models with ``"predict_proba"`` as ``predict_method`` have a probabilities output
"""
if set(models.keys()) != necessary_models:
raise ValueError(f"{necessary_models} should be present in models keys.")
raise ValueError(

Check warning on line 1200 in metalearners/metalearner.py

View check run for this annotation

Codecov / codecov/patch

metalearners/metalearner.py#L1200

Added line #L1200 was not covered by tests
f"necessary_model ({necessary_models}) should equal to keys present in models dictionary."
)
specifications = (
self.nuisance_model_specifications() | self.treatment_model_specifications()
)
Expand Down

0 comments on commit 7bf5258

Please sign in to comment.