-
Notifications
You must be signed in to change notification settings - Fork 20
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 LazyBroadcast for tendencies #3540
Conversation
I'd prefer we didn't introduce more technical concepts in science packages without proper documentation and written guidence on what they do and how to use them, especially if this becomes more and more common. The goal should be that people developing this package should be able to understand and use this feature without input from experts. Examples of questions:
One way to check that you provided enough guidance is with user stories and asking people if they can use and understand this feature without your input. Example of a user story: I am a reserach scientist and I am debugging a piece of ClimaAtmos. I notice that the return objects of some the functions I call are some It's up to you to where you add documentation and guidance. For example, you might decide that LazyBrodcast is intended for a technical audience. That would be fine, but then you have to provide documentation within ClimaAtmos (or ClimaCore and links to the relevenat documentation in ClimaAtmos). I think that this is very important. Many Clima packages, including ClimaAtmos and ClimaCore, require a lot of tribal knowledge to be used and developed. This is a big barrier to adoption, developlment, and suistanability in general. I think we should really strive to make sure that all our new contributions are propertly documented, while also catching up with the missing documentation. |
We can add documentation. We can also add better unit tests with this approach, which I've also updated.
I agree, but users will need to gain an idea of how to use things, and we can document how things work
The new functional-based tendencies are dispatched in a binary way: one returns a broadcasted object, via
This has several benefits:
This is "manual" fusion. We're manually collecting broadcasted objects, and putting them into a single
I hear you. And I need help with this, as it's a big challenge. Please hear me: we should follow the most promising software design, and provide users with excellent documentation. I don't want to avoid the best path forward because we don't yet have documentation. I need your help writing it.
Yes. Right now, I'm doing a sort-of tracer-bullet PR, to see what this might look like.
Agreed. |
If this is the path we are taking, let's just take the time to document this now. This is part of the delivery of the feature. The questions I listed in the previous message were questions that users ought to be able to find the answer for somewhere, so your answers can be the starting point for this. Even if the final form of this will look different, the documentation written can be still adapted and reused. We will never recover from the missing documentation if we keep adding more missing documentation, especially when documentation is never a priority. |
ab90ff1
to
f91df2a
Compare
Agreed, I think we should start by beefing up documentation at the bottom, and work our way up as things concretize. I just opened CliMA/LazyBroadcast.jl#16. |
To avoid this PR from getting stale, I may add LazyBroadcast as a dependency in a separate PR, so that I don't need to continually rebase the manifest changes. |
9c4d659
to
922b8de
Compare
I'm thinking that we can start by using LazyBroadcast, and not changing the order of tendency computations. This has two benefits:
I'll update the PR. |
8131a8f
to
188c72b
Compare
I think we should address some edge cases first. In particular, I don't want any performance penalty in the case that the functional tendencies are absent. |
188c72b
to
93ca5de
Compare
Slim method arguments Use null broadcasted
93ca5de
to
a2bf3d0
Compare
A step towards #3594.
This PR adds the use of LazyBroadcast.jl to fuse the sponge operations. This is hopefully the beginning of a long road of fusing many operations, and moving the codebase into a more functional, and more unit-tested codebase.