none commited on
Commit
a9ec254
·
1 Parent(s): a75487d

Change text a bit

Browse files
Files changed (1) hide show
  1. app.py +17 -9
app.py CHANGED
@@ -295,12 +295,9 @@ If you click on a node, Plotly will show the path to that node in a banner at th
295
 
296
  The numbers and letters in brackets like `[3.L]` refer to the parent node's position in a breadth-first traversal of the tree and whether the current node is a left or right child of that parent.
297
 
298
-
299
- It looks like Hugging Face has destroyed this animation by making it jump back to the beginning after every step.
300
- Maybe I'm using up too much memory storing all the frames or something.
301
- That's a shame.
302
-
303
- The README in this repo has instructions for how to run this Streamlit app yourself if you want to see the final product in all its glory.
304
  """)
305
 
306
 
@@ -423,10 +420,10 @@ Maybe I'll think on the `value` and `gain` fields a bit and come up with a versi
423
  # but the plot is tiny
424
  # also it recalcualtes all of the plots
425
  # every time the slider value changes
426
- #
427
  # This seems to be affecting the animation too
428
  # so I'm going to leave it out
429
- # It's the largest this by far in the flame graph
430
  #
431
  # I tried to cache the plots but build_plot() takes
432
  # a DataFrame which is mutable and therefore unhashable I guess
@@ -460,7 +457,18 @@ Maybe I'll think on the `value` and `gain` fields a bit and come up with a versi
460
  #)
461
  #st.dataframe(trees[idx])
462
 
463
-
 
 
 
 
 
 
 
 
 
 
 
464
 
465
 
466
  if __name__=='__main__':
 
295
 
296
  The numbers and letters in brackets like `[3.L]` refer to the parent node's position in a breadth-first traversal of the tree and whether the current node is a left or right child of that parent.
297
 
298
+ The trees are a lot deeper than what it shows in the small plot.
299
+ Hugging Face makes the plot ENORMOUS if you expand it, so that isn't much help.
300
+ Pick your poison.
 
 
 
301
  """)
302
 
303
 
 
420
  # but the plot is tiny
421
  # also it recalcualtes all of the plots
422
  # every time the slider value changes
423
+ #
424
  # This seems to be affecting the animation too
425
  # so I'm going to leave it out
426
+ # It's the largest thing by far in the flame graph
427
  #
428
  # I tried to cache the plots but build_plot() takes
429
  # a DataFrame which is mutable and therefore unhashable I guess
 
457
  #)
458
  #st.dataframe(trees[idx])
459
 
460
+ # Cutting this out fixed the broken animation on Hugging Face
461
+ # So that issue was perf-based
462
+ st.markdown('#### (secret third plot)')
463
+ st.markdown("""
464
+ I orginally had a third viz here where you could move a slider to see the data I used to make each plot.
465
+ That viz recalulated every value in the entire app each time the slider moved.
466
+ I had to remove it to get enough perf for the animation to play correctly.
467
+ If you're feeling brave, you can follow the Quickstart in the README to run this app yourself.
468
+ Then you can uncomment that viz to satisfy your curiosity.
469
+ There's definitely some way to fix it.
470
+ Maybe another milestone for v2.
471
+ """)
472
 
473
 
474
  if __name__=='__main__':