forked from google-ai-edge/model-explorer
-
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
Feature: memory info #23
Open
madcampos
wants to merge
18
commits into
main
Choose a base branch
from
feat/memory-info
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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.
There is a new option for displaying memory information.
display_type
propertyThe attribute schema has a new property called
display_type
, for now it only supports thememory
value. The reasoning behind adding a new property instead of extending the editable attribute one is that this only affects the display of the attribute, does not make it editable and don't add any options for changing the display.The updated attribute schema looks like this:
Notes on the value
The
value
for the attribute should be a floating point number, serialized as a string. Javascript only has one number type1 encoded as an IEEE 754 double precision 64bit floating point.So, in general, whatever conforms to Python's
float
type will be interpreted the same in javascript.The UI is making the following assumptions:
value
is a floating point number that is notNaN
value
is grater than or equal to 0value
is smaller than or equal to 1Display example
Here is how the attribute is displayed:
![image](https://private-user-images.githubusercontent.com/609904/411640229-b2f55ccf-03ae-447b-a7af-1a6533d661c3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5NzIyMzYsIm5iZiI6MTczOTk3MTkzNiwicGF0aCI6Ii82MDk5MDQvNDExNjQwMjI5LWIyZjU1Y2NmLTAzYWUtNDQ3Yi1hN2FmLTFhNjUzM2Q2NjFjMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQxMzMyMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MWE4N2MxYjg5NmYwZjhlYzFhOWRhOWRhY2YxZTc2MGU1ZDM3YTZlOTFlNjkxNzkxZDcyZGI2NDM2NDNjMzI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.YaiIArglHc3YgQ62b_cCz_woavXGywOJ0jkfp2APXSU)
Footnotes
Technically, there are two number formats, the other one being
BigInt
for arbitraty precision integers, but using that requires changes on math operations and potentially the use of a specialized library for doing division and other operations that yield fractional/floating point numbers. The all porpouse number type isNumber
. ↩