Giter Club home page Giter Club logo

propel's Introduction

April 19, 2018

TensorFlow.js was recently released. It is well engineered, provides an autograd-style interface to backprop, and has committed to supporting Node. This satisfies our requirements. It is counterproductive to pursue a parallel effort. Thus we are abandoning our backprop implementation, TF C binding, and the TF/DL bridge, which made up the foundation of the Propel library. We intend to rebase our work on top of TFJS.

Our high-level goal continues to be a productive workflow for scientific computing in JavaScript. Building on top of TFJS allows us to focus on higher-level functionality.

We have no release at this time.

propel's People

Contributors

alaq avatar curt-mitch avatar dangerdak avatar dbieber avatar dio avatar indutny avatar lisza avatar markadell avatar mjschock avatar piscisaureus avatar qti3e avatar ry avatar ryanmurakami avatar swarajgiri avatar tmarshall avatar webtaculars avatar yungbeto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

propel's Issues

Save and restore notebooks.

Probably using JSON or a simplified html format stored in s3

<script>
1+2
</script>
<output>3</output>

<script>
plot(x, tanh(x))
</script>
<output><svg>...</svg></output>

[Sign In with Github] button

also we should use github for oauth and have a [Sign In with Github] button above the fold on index.html

being signed in allows one to save/restore notebooks #10

If chromium isn't found, tests hang instead of erroring

node dist/test_browser.js
(node:80319) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
(node:80319) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code

tests don't catch error in notebook evaluation

If I put this syntax error into the website/notebook_mnist.html

import { load. imshow } from "mnist";

(note the period instead of comma)

I get successful tests:

TEST: notebook_mnist.html
> Using DL backend.
> Warning replacing existing OutputHandler.
> SyntaxError: Unexpected token (2:13)
>     at Parser.pp$4.raise (http://localhost:52859/dist/notebook.js:51137:13)
>     at Parser.pp.unexpected (http://localhost:52859/dist/notebook.js:49094:8)
>     at Parser.pp.expect (http://localhost:52859/dist/notebook.js:49088:26)
>     at Parser.pp$1.parseImportSpecifiers (http://localhost:52859/dist/notebook.js:49932:14)
>     at Parser.pp$1.parseImport (http://localhost:52859/dist/notebook.js:49898:28)
>     at Parser.pp$1.parseStatement (http://localhost:52859/dist/notebook.js:49248:47)
>     at Parser.pp$1.parseBlock (http://localhost:52859/dist/notebook.js:49537:23)
>     at Parser.pp$3.parseFunctionBody (http://localhost:52859/dist/notebook.js:50980:22)
>     at Parser.pp$3.parseArrowExpression (http://localhost:52859/dist/notebook.js:50941:8)
>     at Parser.pp$3.parseSubscripts (http://localhost:52859/dist/notebook.js:50489:23)
PASS: notebook_mnist.html

DONE. passed: 4, failed: 0

Add docs for imshow

jsdom doesn't support canvas, so server-side rendering is hard. example code:

import { randn, imshow } from "propel"
img = randn([300, 300]).relu().mul(255);
imshow(img)

[Edit in CodePen] button

feature idea: any notebook cell has a button that allows it to be opened as a complete html example on code pen like with some templated html to load propel.
cell.toHTML().

is output div

API changes

"$" renamed to "T" (Conflicts with JQuery)

"arange" renamed to "range" (I suspect that arange was choose to not conflict with the python keyword range - since JS doesn't have that issue, we should just use "range")

Do commit messages on youtube

Great way to engage people

git commit message must be spoken first, then the author can go more in depth if they want. we will provide a link to a video anonymizing service for people who don't wish to be seen.

A nice 403 error page

Current firebase 403 error behavior is just an error in devs console:

{"error":{"errors":[{"domain":"global","reason":"countryBlocked","message":"This service is not available from Iran. If you believe the country of origin was incorrectly identified, please report it at https://support.google.com/websearch/contact/ip."}],"code":403,"message":"This service is not available from Iran. If you believe the country of origin was incorrectly identified, please report it at https://support.google.com/websearch/contact/ip."}}

Contextify running code in notebooks

Hi,
How about containerizing notebooks' papers? (I don't know what to call it, project. paper, users code, ...)
It allows users to have multiple open containers at once in one tab and of course not touching global variables.
In the Node.js environment, it's possible using VM module, but I know notebooks are about the browser, so I wrote a simple implementation of VM module with all standard APIs for the web ๐Ÿ˜ƒ
Code: CrossVM
If you like the idea behind it I can implement it as an internal dependency in this project.
(And if you ever wondered to use this package (Which I guess you won't), it's good to know it has only one dependency that you already have on this project (acorn))

(Also I'm thinking of implementing this as a web worker so users can be sure their code is running in the background, and re-use that container after a short while (without losing randomly generated data))
Regards.

weird error message

Put this in the notebook:

import { zeros } from "propel";
zeros(5, 5);

It returns

Error: Not implemented
    at Object.makeTypedArray (http://localhost:8080/dist/notebook.js:4900:19)
    at Object.convertBasic (http://localhost:8080/dist/notebook.js:2747:29)
    at Object.convert (http://localhost:8080/dist/notebook.js:4921:33)
    at Object.zeros (http://localhost:8080/dist/notebook.js:6845:34)
    at zeros (http://localhost:8080/dist/notebook.js:5550:16)
    at eval (__cell13__.js:5:11)
    at <anonymous>

zeros take a shape, so the correct call is zeros([5, 5])... So zeros works properly, this issue is about the error message that will confuse people. It should say something like "Error: Zeros takes a shape as an argument"

Compile error

in_alaska@xxxx propel (grid)โ›บ  ./tools/presubmit.js 
Delete dir ./build
node ./tools/cpplint.js
python ./deps/cpplint/cpplint.py binding.cc check.h
Done processing binding.cc
Done processing check.h
node ./tools/tslint.js
node ./node_modules/tslint/bin/tslint -p /Users/in_alaska/propel
node ./tools/stylelint.js
node ./node_modules/stylelint/bin/stylelint.js --config stylelint.json website/main.scss website/normalize.scss website/skeleton.scss website/syntax.scss website/syntax_dark.scss website/syntax_light.scss 
node ./tools/test.js
node ./tools/build_binding.js
mkdir /Users/in_alaska/propel/build
mkdir /Users/in_alaska/propel/build/Release
node tools/extract_so.js /Users/in_alaska/propel/build/Release
outDir /Users/in_alaska/propel/build/Release
Extracting /Users/in_alaska/propel/deps/libtensorflow/libtensorflow-cpu-darwin-x86_64.tar.gz
Extracting libtensorflow.so
/Users/in_alaska/propel/build/Release/libtensorflow.so
Extracting libtensorflow_framework.so
/Users/in_alaska/propel/build/Release/libtensorflow_framework.so
clang -c -o Release/binding.o ../binding.cc -I/usr/local/include/node -I/Users/in_alaska/propel/deps/libtensorflow/include -Wall -W -Wno-unused-parameter -std=gnu++0x -DNODE_GYP_MODULE_NAME=tensorflow-binding -DUSING_UV_SHARED=1 -DUSING_V8_SHARED=1 -DV8_DEPRECATION_WARNINGS=1 -D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION -stdlib=libc++ -mmacosx-version-min=10.7 -arch x86_64 
../binding.cc:703:50: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
  nstatus = napi_create_string_utf8(env, device, NAPI_AUTO_LENGTH, &js_device);
                                                 ^
../binding.cc:1006:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
      NAPI_AUTO_LENGTH,  // JavasScript class name length
      ^
../binding.cc:1019:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
      NAPI_AUTO_LENGTH,  // JavasScript class name length
      ^
../binding.cc:1123:33: error: cannot initialize a member subobject of type
      'napi_addon_register_func' (aka 'void (*)(napi_env__ *, napi_value__ *, napi_value__
      *, void *)') with an lvalue of type 'napi_value (napi_env, napi_value)' (aka
      'napi_value__ *(napi_env__ *, napi_value__ *)'): different number of parameters
      (4 vs 2)
NAPI_MODULE(tensorflow_binding, InitBinding)
                                ^~~~~~~~~~~
/usr/local/include/node/node_api.h:103:26: note: expanded from macro 'NAPI_MODULE'
  NAPI_MODULE_X(modname, regfunc, NULL, 0)
                         ^~~~~~~
/usr/local/include/node/node_api.h:92:7: note: expanded from macro 'NAPI_MODULE_X'
      regfunc,                                                        \
      ^~~~~~~
4 errors generated.
Error -c
Error ./tools/build_binding.js
Error ./tools/test.js
in_alaska@xxxx propel (grid)โ›บ  node -v
v8.4.0

Python like range function (iterable range function)

Hi
When I was trying to implement a simple algorithm in Propel I expected range function to be iterable just like Python's, but it's not ๐Ÿ˜ž

import { range } from "propel"
for (let i in range(10)) {
    console.log(i)
}

Current output:

basic
id

Expected:

0
1
2
3
4
5
6
7
8
9

Is it the expected behavior?
If not is there any way to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.