-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Database Telemetry page to SmartDashboard #38
Conversation
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.
Still working my way through this guy, but I have some initial comments that may be of some interest! Feel free to LMK what you think!!
pathlib.Path(__file__).parent.parent | ||
/ "tests/utils/manifest_files/manifesttest.json", |
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.
Not wrong per-say, but I feel kinda weird having our "default" path be something that (iirc, it might be worth checking me on this) we do not ship in the dashboard *.whl
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.
I'm starting to question if we even want this behavior? It makes it easy on me to test some quick manifest changes (which I selfishly love and use all the time), but I would hate for a user to try to launch the dashboard and get my weird testing manifest information somehow.
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.
Per offline discussion, it sounds like the consensus to to remove these default paths! I'll re-flag any I find in this review!
try: | ||
manifest = load_manifest(manifest_path) | ||
st.session_state["manifest"] = manifest |
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.
Should this load_manifest
call also be in a if "manifest" not in st.session_state
block like in smartdashboard.pages.2_Database_Telemetry
module?
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.
I'm not actually trying to access it in Experiment_Overview.py
, so I left it out because I think forcing the manifest to be reloaded when going back to this page isn't a bad idea. However, now that the manifest file is tracked, maybe it should be added in so it's not reloaded when unnecessary? I'm a little torn.
pathlib.Path(__file__).parent.parent.parent | ||
/ "tests/utils/manifest_files/manifesttest.json", |
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.
Similar concern here as with the other default path
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.
Re-flagging
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.
A couple of small nits and I flagged some things we decided to address offline, but otherwise looks about ready to go on my end!
pathlib.Path(__file__).parent.parent | ||
/ "tests/utils/manifest_files/manifesttest.json", |
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.
Per offline discussion, it sounds like the consensus to to remove these default paths! I'll re-flag any I find in this review!
pathlib.Path(__file__).parent.parent.parent | ||
/ "tests/utils/manifest_files/manifesttest.json", |
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.
Re-flagging
smartdashboard/views.py
Outdated
self.chart: t.Optional[alt.Chart] = None | ||
|
||
if self.telemetry: | ||
self.telemetry_df = self.set_telemetry_df() |
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.
Not wrong, but tends to be a bit of a code smell in my book: We are setting an instance attr to the return value of an instance method. Can self.telemetry_df
be an @property
instead?
NOTE: no need to change this if this is done for performance/caching reasons, but if you could add a comment or something here explaining that that would be appreciated!
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.
It can't be a property because it's changing whenever there are additions to the graph dataframes. But I could set it like this:
if self.telemetry:
self.telemetry_df = self._load_data_update(skiprows=0)
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.
Two small path questions/requests but nothing worth holding approval up over! LGTM!!
MemoryView
,ClientView
, andOrchestratorSummaryView
are updating views housed inside ofTelemetryView
, similar to the views withinOverviewView
for theExperiment Overview
page.Each new view has a corresponding
view_builder
that provides the Streamlit layouts.memory_file
,client_file
, andclient_count_file
were added to theShard
schema.