-
Notifications
You must be signed in to change notification settings - Fork 949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 9 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @annxingyuan, @dsmilkov, and @nsthorat)
package.json, line 56 at r1 (raw file):
"test": "karma start", "run-browserstack": "karma start --browserstack", "test-benchmark": "cd integration_tests/benchmarks && yarn benchmark-travis && cd ../../",
do you mean to be deleting this here?
src/util.ts, line 671 at r1 (raw file):
/** * Returns a platform-specific implementation of `window.fetch`.
can you link to https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
src/util.ts, line 682 at r1 (raw file):
* .then(response => {}) // handle response * ``` */
@doc annotate this inside util? https://js.tensorflow.org/api/latest/#Util
src/util.ts, line 691 at r1 (raw file):
if (ENV.get('IS_NODE')) { // tslint:disable-next-line:no-require-imports fetchFunc = require('node-fetch');
if we call tf.util.fetch multiple times, do we have to keep re-requiring this? can we cache this?
src/util.ts, line 693 at r1 (raw file):
fetchFunc = require('node-fetch'); } else { throw new Error(`Unable to find fetch polyfill.`)
semicolon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @annxingyuan and @dsmilkov)
src/util.ts, line 671 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
can you link to https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Done
src/util.ts, line 682 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
@doc annotate this inside util? https://js.tensorflow.org/api/latest/#Util
Done
src/util.ts, line 691 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
if we call tf.util.fetch multiple times, do we have to keep re-requiring this? can we cache this?
Done
src/util.ts, line 693 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
semicolon
Done
Closed in favor of #1663 |
This PR fixes tensorflow/tfjs#1439
Changes
tf.util.fetch
node-fetch
as dependencyBrowserHTTPRequest
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)