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

Use in-place operations for cross-correlations #206

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

dafeda
Copy link
Collaborator

@dafeda dafeda commented Jan 11, 2024

No description provided.

@dafeda dafeda marked this pull request as ready for review January 12, 2024 11:01
@dafeda dafeda self-assigned this Jan 12, 2024
Copy link
Collaborator

@tommyod tommyod left a comment

Choose a reason for hiding this comment

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

Some comments in Norwegian:

Alt ser riktig ut, men litt plukk som du kan vurdere å gjøre noe med:

  • Metoden dokumenterer ikke at X blir mutert, jeg ville skrevet det i caps lock omtrent, fordi det er relativt uvanlig. Aller helst ville jeg hatt et "overwrite" flagg, som default er False. (da er ting litt lettere å teste også)
  • Metoden både muterer et input argument, og returnerer referanse til argumentet. Men funksjonene "_corr_to_cov_inplace" muterer et input argument, og returnerer None. Her tenker jeg at vi bør gjøre det samme for å unngå overraskelser. Jeg lener mot å returnere svaret uansett. Å returnere None og mutere et input argument føles veldig lite Python-aktig ut.

Det er jo i experimental, så om du vil merge med en gang så er det OK. Men jeg ville selv ha lagt på et "overwrite" flagg for å være eksplisitt, og alltid returnert referanse til svaret og aldri bare None.

@dafeda
Copy link
Collaborator Author

dafeda commented Jan 12, 2024

Thanks @tommyod !
I have implemented your suggestions and also added a change that calculates stds_X and stds_Y only once.

Copy link
Collaborator

@tommyod tommyod left a comment

Choose a reason for hiding this comment

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

Looks good to me! Good idea to compute stds once too!

src/iterative_ensemble_smoother/experimental.py Outdated Show resolved Hide resolved
Co-authored-by: Tommy <10076072+tommyod@users.noreply.github.com>
@dafeda
Copy link
Collaborator Author

dafeda commented Jan 15, 2024

Ran Drogon on Stavanger node and it ran in about 2h 40min. This is about an hour slower than last time I ran drogon on the Bergen node. Will need to do more testing, but at least it did not run out of memory so merging.

@dafeda dafeda merged commit 1ef022d into equinor:main Jan 15, 2024
9 checks passed
@dafeda dafeda deleted the memory_usage branch January 15, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants