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

Info that gradients could not agree #67

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading