fixes #560: add computational cost tab to GUI evaluator#561
Open
AdityaX18 wants to merge 1 commit intoJdeRobot:masterfrom
Open
fixes #560: add computational cost tab to GUI evaluator#561AdityaX18 wants to merge 1 commit intoJdeRobot:masterfrom
AdityaX18 wants to merge 1 commit intoJdeRobot:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #560
Adds a Computational Cost tab to the Streamlit GUI that wraps
TorchImageDetectionModel.get_computational_cost()for the currently loaded detection model. Closes the GUI ↔ CLI feature parity gap flagged in the discussion on #539.Closes #XXX.
Changes
tabs/computational_cost.py— standalone tab function following the*_tab()convention used by the other three tabs. No shared base (matches the existing codebase pattern).app.py— three edits:computational_cost_tabst.tabs([...])from 3 to 4 entriesPAGESdict to stay in syncHow it works
st.session_state.detection_model(consistent withevaluator_tabandinference_tab).get_computational_cost()call behindst.button("Run Cost Analysis")so widget interactions (number inputs) don't retrigger 30+ forward passes on every keystroke.st.session_state.computational_cost_resultso re-renders on widget changes reuse the cached result instead of recomputing.examples/torch_computational_cost.py(n_params / 1e6for M,inference_time_s * 1000for ms) — no new formatting invented.st.download_buttonmirrors the CLI'sresults.to_csv(out_fname)behavior.Testing
Manual, locally:
streamlit run app.pylaunches without errors.Out of scope
get_computational_cost()itself. FLOPs / MACs reporting is proposed as a follow-up issue with a separate dependency discussion.