alibaba / pipcook

Machine learning platform for Web developers
https://alibaba.github.io/pipcook/
Apache License 2.0
2.55k stars 209 forks source link

costa: make boa and datacook be global #777

Closed FeelyChau closed 3 years ago

FeelyChau commented 3 years ago

The script is not adaptive for now.

yorkie commented 3 years ago

Boa is improper as a global object because we don't expect it as a Web API.

yorkie commented 3 years ago

That's great if developers still could import Python package via ESM:

import * as np from 'py:numpy';

See https://github.com/imgcook/boa/blob/main/tests/es-module-loaders/py/test-esm-loader-custom.mjs.

yorkie commented 3 years ago

Any updates @FeelyChau?

FeelyChau commented 3 years ago

This PR could be closed, boa and DataCook could be required at runtime by excluding then when bundle.