-
Notifications
You must be signed in to change notification settings - Fork 19
Adds logging [INFO] to TimelineVisualizationCallback
and HistoryCallback
#548
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
Conversation
I think it should close both! |
No idea why the Apache Beam tests are failing though 😕 |
Thanks for the PR @norlandrhagen!
This code was originally based on code from Lithops for producing a timeline image, so some of it may be redundant. Please go ahead and remove code paths that are not used so it's more similar to
No, it should go in client code. Perhaps add it to examples/add-random.py and examples/matmul-random.py? |
Not related to this PR. Opened #549 |
…timeline(), removed default logging info level from __init__
Do you see any place where logging or optional logging might be useful? Maybe default off, but user enabled --debug flag could output some info about where callback artifacts are written. Also happy to remove it and just mention in the docs of where you can expect them to be written. ex:
|
It would be useful, but the problem is that if you configure logging then that will interfere with logging that the user has configured (often in non-obvious ways). So I think adding logging to the examples is a good compromise. Also mentioning in the docs. |
Makes sense! Thanks for explaining. |
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.
Thanks @norlandrhagen! LGTM. I've made one small suggestion. Let me know when you're ready to merge.
Co-authored-by: Tom White <[email protected]>
If you're happy with the doc suggestions, then it's ready to merge. |
…llback` (cubed-dev#548) * added info level logging to HistoryCallback to share directory * add logging to timeline & update mkdir to pathlib style * moved figure creation into timeline on_compute_end(), removed create_timeline(), removed default logging info level from __init__ * removed history & timeline logging * adds more detail to diagnostics.md * Update docs/user-guide/diagnostics.md Co-authored-by: Tom White <[email protected]> --------- Co-authored-by: Tom White <[email protected]>
Small PR that:
TimelineVisualizationCallback
andHistoryCallback
write their artifacts to.TimelineVisualizationCallback
os.mkdir to the Pathlib mkdir used in the HistoryCallback. This seems to fix theFileNotFoundError
inTimelineVisualizationCallback()
usage [cubed - cubed/xarray] #544.example logging:
Some remaining Q's:
The
TimelineVisualizationCallback
calls an external function (to the class)create_timeline
that has args for such asdst=None
, which are not a part ofTimelineVisualizationCallback
. Is thiscreate_timeline
function used anywhere else? I ask this b/c the optionaldst
arg creates a few more path creation options. If it is confined toTimelineVisualizationCallback
, the logic could be more similar toHistoryCallback
which is a bit cleaner.I added info level logging to
diagnostics/__init__.py
is this OK to set logging here?