Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Info that gradients could not agree
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri authored and agoscinski committed Oct 27, 2023
1 parent 63c9c54 commit c858bed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/equisolve/numpy/models/linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _validate_data(self, X: TensorMap, y: Optional[TensorMap] = None) -> None:
X, y, check=["samples", "components"]
):
raise ValueError(
"Metadata (samples, components) of X and y does not agree!"
"Metadata (samples, components, gradients) of X and y does not agree!"
)

def _validate_params(
Expand All @@ -69,7 +69,8 @@ def _validate_params(
"""
if not metatensor.equal_metadata(X, alpha, check=["components", "properties"]):
raise ValueError(
"Metadata (components, properties) of X and alpha does not agree!"
"Metadata (components, properties, gradients) of X and alpha does "
"not agree!"
)

if sample_weight is not None and not metatensor.equal_metadata(
Expand All @@ -81,7 +82,8 @@ def _validate_params(
],
):
raise ValueError(
"Metadata (samples, components) of X and sample_weight does not agree!"
"Metadata (samples, components, gradients) of X and sample_weight "
"does not agree!"
)

for key, alpha_block in alpha.items():
Expand Down

0 comments on commit c858bed

Please sign in to comment.