-
Notifications
You must be signed in to change notification settings - Fork 3
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
Do not expose exact download progress #15
Comments
Some offline discussed suggested we should do this censoring, but we should be sure that the values are granular enough that developers still see progress every 50 ms in the typical case. That is, if we just used the integers 1-100, it's possible that for large models it'd take longer than 50 ms to move from 1 to 2. Some rough numbers for order-of-magnitude:
We have a few ways to accomplish this:
I feel pretty strongly that we should update I'm unsure on the choice between (2) and (3). @tomayac points out that HTML's |
Developers are lazy (I am), so any normalization to the |
@annevk as XHR owner, any initial reactions to extending |
Probably okay? |
This allows specifications to use ProgressEvents while not necessarily giving away the exact number of bytes, while maintaining a granularity greater than just 1 part in 100. See discussion in webmachinelearning/writing-assistance-apis#15 for the concrete use case.
Closes #15. Depends on whatwg/xhr#394.
#30 implements this. Note that my above calculations use base 10, but I realized that JavaScript (and C++) numbers are base 2. So the last step is changed from 1 part in 100,000 to 1 part in 65,536. The spec has the full updated calculation (using MathML!). |
This allows specifications to use ProgressEvents while not necessarily giving away the exact number of bytes, while maintaining a granularity greater than just 1 part in 100. See discussion in webmachinelearning/writing-assistance-apis#15 for the concrete use case.
As a user, I want to know if the proposed download is 1.5G or 1.5M. Maybe that should be in the agent's UI, especially since there's no guarantee that the page will present any information about the download at all. |
Yeah, that definitely seems like a user agent UI thing. Maybe it's a bit of user agent UI we should recommend in the spec, though. |
Yeah, I think recommending it in the spec is a good idea. |
Closes #15. Depends on whatwg/xhr#394.
Closes #15. Depends on whatwg/xhr#394.
This allows specifications to use ProgressEvents while not necessarily giving away the exact number of bytes, while maintaining a granularity greater than just 1 part in 100. See discussion in webmachinelearning/writing-assistance-apis#15 for the concrete use case.
Probably we should not expose the exact model size during the download progress, as doing so basically lets you know the model ID. This is a slight fingerprinting and compatibility concern. We could instead expose the nearest percent or tenth of a percent.
Are there any concerns about this?
The text was updated successfully, but these errors were encountered: