-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Baseball models, client, and server #66
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
Took a first pass. The 3 major comments I have:
Reviewed 19 of 24 files at r1, 5 of 5 files at r2. .gitignore, line 1 at r2 (raw file):
Since we've standardized all the examples, we have a global README.md that talks how to build and run any of the examples, in addition on an example-specific readme that is much simpler. In this case, since this example is more complex (with server/client architecture), we should definitely have a readme with instructions on how this example is structured, what technologies it uses and how to build and test. .gitignore, line 7 at r2 (raw file):
Store the downloaded data in baseball/dist/ where all generated files go. This way you don't have to git-ignore the json explicitly here. baseball/package.json, line 1 at r2 (raw file):
rename the folder to baseball-node to clarify that it is a node demo. This will align with other examples where we use -core and -layers suffix baseball/package.json, line 3 at r2 (raw file):
might be good to add "private": "true" - an additional signal we won't publish this to npm. baseball/package.json, line 5 at r2 (raw file):
do we need this "main" property? I think you can remove it baseball/package.json, line 9 at r2 (raw file):
Are we pretty close to publishing tfjs-node to npm? Asking since if you can publish to npm before we check in this demo, then we don't have to come back and update this demo. Also we will dogfood the npm and simplify the build process (no need to link-local) baseball/package.json, line 26 at r2 (raw file):
replace all "^..." with "~..." to be a little more strict with the versioning. This helps reduce breakages in the fast moving npm world baseball/package.json, line 43 at r2 (raw file):
move tfjs, tfjs-node and other things that are used at run-time from devDependencies down here baseball/tsconfig.json, line 2 at r2 (raw file):
All of the other baseball/webpack.config.js, line 1 at r2 (raw file):
add license baseball/webpack.config.js, line 14 at r2 (raw file):
Again based on community feedback. Not in this PR, but definitely worth filing a bug: To make the demo simpler and more accessible and to keep the focus on the library itself, we should remove vue and just use a plain JS for the UI. baseball/src/abstract-pitch-model.ts, line 26 at r2 (raw file):
noticed it's an abstract class without any abstract methods, whick makes it a bit hard to identify what the job of the subclass is. baseball/src/pitch-data.ts, line 19 at r2 (raw file):
Use the public API baseball/src/utils.ts, line 22 at r2 (raw file):
use baseball/src/train/train-pitch-type-model.ts, line 24 at r2 (raw file):
Is this used only for testing? In general, what's the purpose of the Comments from Reviewable |
Review status: all files reviewed at latest revision, 15 unresolved discussions. baseball/webpack.config.js, line 18 at r2 (raw file):
is this needed, since we use plain css in the example? Comments from Reviewable |
Review status: 0 of 25 files reviewed at latest revision, 16 unresolved discussions. .gitignore, line 7 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/package.json, line 1 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/package.json, line 3 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/package.json, line 5 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/package.json, line 9 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Still waiting on internal approvals. Probably going to be early next week. baseball/package.json, line 43 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/webpack.config.js, line 1 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/src/abstract-pitch-model.ts, line 26 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
I took a pass, renamed this and added some comments. Mostly, training is abstracted into this class - models simply subclass and just define the training fields, label, and prediction method. baseball/src/pitch-data.ts, line 19 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/src/utils.ts, line 22 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
Done. baseball/src/train/train-pitch-type-model.ts, line 24 at r2 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
These are sample scripts to demonstrate training w/o all the client/server infrastructure. I was going to put these in a readme. Comments from Reviewable |
Reviewed 25 of 56 files at r3. Comments from Reviewable |
This is rather large - so getting this started now.
This change is