Skip to content

Conversation

guillaumeeb
Copy link
Member

Closes #9055

  • No test added
  • [x ] Passes pre-commit run --all-files

At first, I tried to configure Bokeh DatetimeTickFormatter to avoid showing context. I guess this looks the same than task stream a few months ago:
image

From what I could tell, there already was this 01/01 legend, which annoyed me.

Then I became aware of the timedelta formatter, which in the end is what Task stream information is showing, so just switching to this:

image

I feel the second solution is better.

Some considerations:

  • I really don't know how to add test for that and if it's possible.
  • There is probably some checks to do on Bokeh version, it seems timedelta x_axis_type was only integrated in Bokeh 3.8 last version... Not sure how it should be handled.

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Sep 10, 2025

Opened #9110 to track unrelated CI failures here

Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ±0      27 suites  ±0   5h 22m 6s ⏱️ - 3m 56s
 4 089 tests ±0   3 980 ✅ +1    107 💤 ±0  2 ❌  - 1 
32 513 runs  ±0  30 957 ✅ +1  1 552 💤 ±0  4 ❌  - 1 

For more details on these failures, see this check.

Results for commit 331e137. ± Comparison against base commit 7024d52.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Mindeps seems to be passing so that suggests older versions are working ok.

When it shows the timedelta what is it a delta from? From when the scheduler started, when the dashboard was opened, or something else?

If it's from scheduler start then that makes a lot of sense to me.

@guillaumeeb
Copy link
Member Author

When it shows the timedelta what is it a delta from? From when the scheduler started, when the dashboard was opened, or something else?

To be honest, I don't know. I've add negative start times if submitting tasks before the Scheduler has really started. But if I wait, it always starts tasks at 0. I try to investigate through TaskStreamPlugin, but I'm really not sure of the logic.

@guillaumeeb
Copy link
Member Author

Mindeps seems to be passing so that suggests older versions are working ok.

Just to be sure, I tried with Bokeh 3.7.0, and I've got an error when opening the Dashboard:

ValueError: failed to validate FigureOptions(...).x_axis_type: expected either None or a value of type Either(Auto, Enum('linear', 'log', 'datetime', 'mercator')), got 'timedelta'
2025-09-12 14:24:42,056 - tornado.application - ERROR - Uncaught exception GET /status (127.0.0.1)

So probably not a so simple change if we want some bokeh backward compatibility...

@jacobtomlinson
Copy link
Member

We could just add a runtime check on the bokeh version, on older versions we just leave the date bug in and use datetime and on newer versions use timedelta?

@guillaumeeb
Copy link
Member Author

Yes that would make sense, I was not sure if this was already something that was done somewhere. So just something like

     x_axis_type="timedelta" if bokeh.__version__ >= 3.8 else "datetime"

@jacobtomlinson
Copy link
Member

Yeah exactly. We do this in other places to handle bokeh backward compatibility. E.g

if BOKEH_VERSION < parse_version("3.3.0"):
from bokeh.server.server import BokehTornado as DaskBokehTornado
else:
from bokeh.server.server import BokehTornado
class DaskBokehTornado(BokehTornado): # type: ignore[no-redef]
def resources(self, absolute_url: str | bool | None = True) -> Resources:
return super().resources(absolute_url)

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Thanks @guillaumeeb.

I tried it out locally and it looks good. Pushed some quick linting fixes.

Happy to merge pending CI

@guillaumeeb
Copy link
Member Author

How, thanks @jacobtomlinson, I was looking at those linting problems but you beat me to it!

Just a quick summary: I tested this with bokek 3.4, dashboard looks like this:
image

With bokeh 3.5 to 3.7:
image

And bokeh 3.8:
image

So I guess with some up to date Bokeh version, the displayed information will be less misleading!

@jacobtomlinson
Copy link
Member

Yeah I think all of this is an improvement over the original screenshot from #9055

image

@jacobtomlinson
Copy link
Member

Windows CI failures unrelated (xref #9114)
MacOS CI failures unrelated (xref #9113)

@jacobtomlinson jacobtomlinson merged commit fe6f44f into dask:main Sep 19, 2025
22 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task Stream dashboard now showing date
2 participants