-
Notifications
You must be signed in to change notification settings - Fork 2k
Create a new tf.env() getter that returns the global ENV #2034
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
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 2 of 2 files at r1.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @dsmilkov)
File a bug and assign it to the 2.0 project: https://github.com/tensorflow/tfjs/projects/10 |
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 46 of 46 files at r2.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @nsthorat)
tfjs-converter/src/data/compiled_api.ts, line 25 at r2 (raw file):
// tslint:disable-next-line:ban-ts-ignore see above // @ts-ignore exports = {};
this is something we now do in the sync script internally? Revert here?
tfjs-core/src/environment.ts, line 168 at r2 (raw file):
`Could not parse value flag value ${value} for flag ${flagName}.`); }
add jsdoc and export it in globals.ts
so it shows up in our API docs
tfjs-core/src/environment.ts, line 169 at r2 (raw file):
} export function environment() {
how about making it shorter: tf.env()
-- still clear what it returns.
Also can you file a bug and assign to this project https://github.com/tensorflow/tfjs/projects/10 which tracks 2.0 |
Issue already filed: #2124 |
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:
complete! 1 of 1 approvals obtained
tfjs-converter/src/data/compiled_api.ts, line 25 at r2 (raw file):
Previously, dsmilkov (Daniel Smilkov) wrote…
this is something we now do in the sync script internally? Revert here?
Done
tfjs-core/src/environment.ts, line 168 at r2 (raw file):
Previously, dsmilkov (Daniel Smilkov) wrote…
add jsdoc and export it in
globals.ts
so it shows up in our API docs
Done
tfjs-core/src/environment.ts, line 169 at r2 (raw file):
Previously, dsmilkov (Daniel Smilkov) wrote…
how about making it shorter:
tf.env()
-- still clear what it returns.
Done
This is for the no exported objects rule which is against ES2015 module semantics.
This will be a replacement for anyone using tf.ENV as a global getter (we will not remove tf.ENV until the next major version bump).
We won't use exports = {} because it breaks the OSS build.
This change is