-
Notifications
You must be signed in to change notification settings - Fork 9
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
Partial preprocessor implementation #52
Conversation
…config given (no timestep). Add bmi tests.
reorg some docs doc effort
should say: I want to merge this now rather than after all the other stuff is implemented because this was kind of a pain to get mergable on top of the recent PRs, so it will be easier to make incremental change on top now. |
891f581
to
70bda53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General thoughts
- I'm super stoked about the preprocessor and the general idea for the API and argument parsing. I think this is a great step forward for us in coming to a stable API for users.
- I'm a-ok with all the renaming. There were several things that made the interface quite confusing, and doing some consistent renaming is a good thing.
- The beginnings of the jobs list matrix expansion is dopeeeee.
Concerns
The only concern I have is with the idea of eliminating a default timestep choice for the user. I think a lot of the parameters where we supply a default value are similarly arbitrary, but we don't force the user to supply. I would prefer, in some ways, to supply a default (5 or 10) and if the user doesn't supply one, maybe it could automatically activate the verbose = 2
flag or something and print a warning so that they know they're running with a default value and that their computer isn't cycling garbage.
I am willing to be persuaded, but could you make the argument for changing it to a required parameter?
Goof by me
I made comment somewhere about using pytest.raises()
but I was going commit-by-commit, and I saw that you fixed it, but now I can't find the comment to delete it. oops.
EDIT: found and resolved this ^
@@ -142,6 +142,3 @@ coeff_U_ero_sand: | |||
alpha: | |||
type: ['float', 'int'] | |||
default: 0.1 | |||
timesteps: | |||
type: ['float', 'int'] | |||
default: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we remove the notion of a default timestepping?
Thanks for checking out @ericbarefoot 🌮
I think the concept of time in modeling ( The way I set it up, the high level API requires the user to specify the timesteps; they may specify it in either the That said, you're right, it could still have a default value. But practically speaking, I can't imagine why anyone would ever want to specify a bunch of parameters in their own Now, all THAT said, most users who are really doing science will likely change lots of the input parameters and use the low-level API anyway, so it's kind of irrelevant. |
ebe6e44
to
6016668
Compare
This is kind of a mess of a PR. I apologize for that.
The main contribution here is the addition a feature INcomplete preprocessor for the model. In preparation for more advanced YAML parsing, I refactored some of what Eric put together on the command line interface #31.
In short, I have started to set up a "high level" and "low level" API.
high level
The high level API works from the command line as Eric nicely implemented:
where the
.yml
must have timesteps specified to work from the high level API. Alternatively the API can be used as:which would run the
.yml
for two timesteps and thetimesteps
does not need to be specified within the yaml then.There is also a high-level python API that works as:
which would run the jobs defined by the
input_file
for two timesteps each.The incomplete features that should become part of the preprocessor:
ensemble: N
option to run the same configN
times with different seedspreprocessor
allows us to use mpi4py to run jobs easily on multiple cores (clusters)I will open issues about these points after merge.
With this PR, time looping is only part of the package high-level API, so this kind of gets rid of the need for the
run_pyDeltaRCM.py
script and the looping there, but I did not yet delete these files. I think we should wait until we get checkpointing reimplemented.low level
You can still use the low-level api:
other junk I did
DeltaModel
as we have discussed and renamed the module tomodel
.run_pyDeltaRCM
to justpyDeltaRCM
pytest.fixture
to be used in every test that needs aDeltaModel
so that tests no longer create temporary files in the package working directory (used to createtest
andpyDeltaRCM_output
)