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

[tracking] Browser Support #123

Open
andrewnc opened this issue Nov 25, 2022 · 2 comments
Open

[tracking] Browser Support #123

andrewnc opened this issue Nov 25, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@andrewnc
Copy link

Great work on shumai! I'm very new to bun specifically and javascript in general, but I love the idea.

I am trying to import shumai into an html page I'm building and am curious how all the pieces work together.

I have @shumai/shumai installed via bun and can import it using ES6 syntax into a .js file no problem.

I run bun bun which generates a node_modules.bun which can be copied into node_modules.js by running ./node_modules.bun > node_modules.js

I can then import a script module <script type="module" src="node_modules.js">...</script> which seems to work.

However, as is intended by bun, hashes are exported instead of the modules holding the same structure. So now importing and using sm doesn't expose the same API and randn or tensor for example aren't available.

In your time working with bun, have you figured out a supported way to do this? How would you suggest using shumai in a web page?

I appreciate your help

@bwasti bwasti self-assigned this Nov 26, 2022
@bwasti bwasti added the enhancement New feature or request label Nov 26, 2022
@bwasti bwasti changed the title Import into web page [tracking] Browser Support Nov 26, 2022
@bwasti
Copy link
Contributor

bwasti commented Nov 26, 2022

Unfortunately, we don't have a browser backend yet. I'll leave this open as the web support tracking issue!

We'll probably want to use the kernels in TF.js and Paddle.js.

I'm curious to hear about your use case. Are you targeting portability (runs on phones etc) or would you be happy to use specific browsers (which comes with speed)?

@andrewnc
Copy link
Author

Not mobile, I'm mostly interested in the "privacy" aspect of running everything client side. So speed and generality matter less than simply working. I like the tensor interface of Shumai. I'm happy to help out here if I can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants