-
Notifications
You must be signed in to change notification settings - Fork 21
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
log.txt not updated after changing parameter through change in config=Wflow.config(wflwow_sbm.toml) #234
Comments
That is strange, this should work. I tried, but cannot reproduce: using Wflow
# modified TOML to have
# [input.lateral.subsurface]
# ksathorfrac.value = 1.0
config = Wflow.Config("test/sbm_simple.toml")
config.input.lateral.subsurface.ksathorfrac.value # 1.0
config.input.lateral.subsurface.ksathorfrac.value = 2.0
config.input.lateral.subsurface.ksathorfrac.value # 2.0
Wflow.run(config) # logs: Info: Set `lateral.subsurface.ksathorfrac` using default value `2.0`. Perhaps you could add |
thx, i see that the log.txt file is not created at all, hence they are all the same. I also see the value is properly being picked up. However, I don't understand why the log.txt file is not being created. |
Oh yes if you use Wflow.run with a config object rather than a path to a TOML file it doesn't create the logging file. This is mentioned in the docstring Lines 137 to 138 in d1dcbfe
But would be good to mention in the logging docs as well. Probably we can also fix that, right now it's done like that do avoid creating the file twice since one method calls the other. |
I have added a small sentence to the logging docs about this: a41dc53. We could indeed fix this. On the other hand, since this is in most cases run from a custom Julia file, I guess it is probably easier to just implement the logging at that level. |
I'm running wflow through the pywflow wrapper, which uses Wflow.run with a config object, so I'm having the same problem. It would be very helpful to be able to set the silent=True setting in the toml file. Has there been any development on this bug, and if not, is there perhaps a quick patch that I can apply locally where I hardcode the option to not print everything to the terminal? I could try it myself but I doubt that I'll find a solution quickly |
It is possible to set silent=true in the TOML file. Would that help in your case? If logging to a file is in your case important, you could follow the logic in the Wflow.run function with a TOML path for the logging part, and use that in a custom run function. |
I have added silent=True to the TOML file, along with loglevel and pathlog but none of them are read. |
log.txt keeps default value and not the the value assigned ({{workflow.parameters.ksathorfrac}});
this is de default in the toml
[input.lateral.subsurface]
ksathorfrac.value = 100
The text was updated successfully, but these errors were encountered: