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

[docs] add note about pyodide support #6715

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[docs] add note about pyodide support #6715

wants to merge 3 commits into from

Conversation

jameslamb
Copy link
Collaborator

This is SO COOL .... I learned tonight that Pyodide is building a version of the lightgbm Python package that runs in a web browser.

https://github.com/pyodide/pyodide/tree/main/packages/lightgbm

Try it yourself.... go to https://pyodide.org/en/stable/console.html (recommended from https://pyodide.org/en/stable/usage/index.html), and run the following:

import lightgbm as lgb
from sklearn.datasets import make_regression
from sklearn.metrics import r2_score

X, y = make_regression(n_samples=10_000, n_features=5, n_informative=5)
bst = lgb.train(
    train_set=lgb.Dataset(X, label=y),
    params={"objective": "regression", "verbose": -1}
)

print(r2_score(y, bst.predict(X)))
# 0.995701411473822
image

🤯 🤯 🤯 🤯

This proposes adding a note about that to the README.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Interesting project indeed! I have never heard about it before.

README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants