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

Gb/trh loss #142

Merged
merged 12 commits into from
Jan 20, 2023
Merged

Gb/trh loss #142

merged 12 commits into from
Jan 20, 2023

Conversation

grantbuster
Copy link
Member

No description provided.

@@ -1106,7 +1106,7 @@ def preflight(self):
msg = (f'sample_shape[2] ({self.sample_shape[2]}) cannot be larger '
'than the number of time steps in the raw data '
f'({len(self.raw_time_index)}).')
if len(self.raw_time_index) >= self.sample_shape[2]:
if len(self.raw_time_index) < self.sample_shape[2]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch, fixed this in my current dev branch also.

Copy link
Member Author

Choose a reason for hiding this comment

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

it was driving me insane haha

Comment on lines 146 to 149
meta = params['meta']
args = signature(cls.__init__).parameters
kwargs = {k: v for k, v in meta.items() if k in args}
model = cls(**kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you use this code block in linear.py also, and it seems useful as a separate function or an inherited method?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah good point i think we can actually inherit the surface model from the linear model. Let me test it.

@grantbuster grantbuster merged commit 60fab96 into main Jan 20, 2023
@grantbuster grantbuster deleted the gb/trh_loss branch January 20, 2023 16:36
github-actions bot pushed a commit that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants