Skip to content
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

hparams: sends 4 requests when hparams data is missing #4970

Open
stephanwlee opened this issue May 13, 2021 · 0 comments
Open

hparams: sends 4 requests when hparams data is missing #4970

stephanwlee opened this issue May 13, 2021 · 0 comments

Comments

@stephanwlee
Copy link
Contributor

Repro steps:

  1. launch TB on an empty logdir
  2. open your favorite dev tools
  3. open the hparams dashboard
  4. notice 4 requests to /data/plugin/hparams/experiment

Description: not a bug per say but this is an inefficiency.

Cause:

  1. requestManager has a retry mechanism and # of retries are determined by the setting:
    constructor(nSimultaneousRequests = 1000, maxRetries = 3) {
  2. hparams dashboard uses the requqestManager:
    if (this._useHttpGet) {
    const encodedRequest = encodeURIComponent(JSON.stringify(request_proto));
    const url =
    this._apiUrl + '/' + methodName + '?request=' + encodedRequest;
    return this._requestManager.request(url);
    }
    /* Use POST */
    const requestOptions = new RequestOptions();
    requestOptions.withCredentials = true;
    requestOptions.methodType = HttpMethodType.POST;
    requestOptions.contentType = 'text/plain';
    requestOptions.body = JSON.stringify(request_proto);
    const url = this._apiUrl + '/' + methodName;
    return this._requestManager.requestWithOptions(url, requestOptions);
  3. requestManager retries on non-200:

Ideal changes:

  • we retry only when error status is status < 100 || status >= 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant