Git Product home page Git Product logo

marcelle's Introduction

Marcelle

An Interactive Machine Learning Toolkit

https://marcelle.dev

Status License npm version

Status ⚠️

Marcelle is still experimental and is currently under active development. Breaking changes are expected at every minor version.

About

Marcelle is a modular open source toolkit for programming interactive machine learning applications. Marcelle is built around components embedding computation and interaction that can be composed to form reactive machine learning pipelines and custom user interfaces. This architecture enables rapid prototyping and extension. Marcelle can be used to build interfaces to Python scripts, and it provides flexible data stores to facilitate collaboration between machine learning experts, designers and end users.

Getting started

See online documentation

npm init marcelle marcelle-tutorial
cd marcelle-tutorial
npm install
npm run dev -- --open

Usage

See Online Documentation

Contributing

See CONTRIBUTING.md

✍️ Credits

Marcelle is a research project led by Jules Françoise (CNRS researcher at LISN) and Baptiste Caramiaux (CNRS researcher at ISIR).

This research was supported by the ELEMENT project (ANR-18-CE33-0002) from the French National Research Agency.

Authors

Citing this work

Please cite the following publication when refering to Marcelle in academic publications:

Jules Françoise, Baptiste Caramiaux, Téo Sanchez. Marcelle: Composing Interactive Machine Learning Workflows and Interfaces. Annual ACM Symposium on User Interface Software and Technology (UIST ’21), Oct 2021, Virtual. DOI: 10.1145/3472749.3474734.
> PDF

Supporting institutions

🔨 Built Using

🎉 Acknowledgements

marcelle's People

Contributors

bcaramiaux avatar cy-moi avatar julesfrancoise avatar lched 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

marcelle's Issues

Trailing integer in text data interpreted as Date in DatasetTable

Describe the bug
I was trying to display some data with datasetTable and found that some of the texts were interpreted as Date.
For example, 1 is interpreted as a Date and reformat to about 22 years ago

To Reproduce
Steps to reproduce the behavior:

  1. Follow examples to initialize dataset and datasetTable variables
  2. Have some entries with integers or entries ending with an integer, ie. 1, sample 1, etc.
  3. use dataset.create() to append the data as in object format, ie.{entry: '1'}
  4. add the table on dashboards with use()
  5. See 1 -> about 22 years ago

A simpler way to reproduce the behavior:

  1. open Iris-SKlearn example
  2. change Virginica to Virginica 1 or Setosa' to Setosa 1`
  3. load the data in the demo
  4. see Virginica 1 become about 22 years ago

Expected behavior
It should display the original data as in the storage.

Actual behavior
Integers in texts interpreted as Date
Format Error in Console
Does not match to data in Storage

Additional Information
log in the console:

Date Parsing Error text data sample1 RangeError: Invalid time value
    at formatDistance3 (index.js:110:11)
    at formatDistanceToNow (index.js:92:10)
    at Array.formatDate (TableContentCell.svelte:18:16)
    at Object.p (TableContentCell.svelte:45:14)
    at Object.p (TableContentCell.svelte:57:5)
    at update (index.mjs:1191:36)
    at flush (index.mjs:1158:13)

Screenshots
table appearances - actual data in localstorage
after changing Setosa to Setosa 1 in Iris csv

Coco-SSD requires a CPU backend

Describe the bug
Module coco-ssd throws an error on each prediction because a CPU backend is not registered

To Reproduce
Run object-detection example

Additional Information
CPU backend was removed recently we could consider reintegrating it by default.

imageUpload and webcam sending streams of TensorLike for onnxModel or tfjsModel

Hello,

First: thank you for this promising library!

Is your feature request related to a problem? Please describe.

I would like to test MarcelleJS to create a webpage for object detection or semantic segmentation, using a trained model stored in ONNX format. So far I'm just trying to adapt this example: https://github.com/marcellejs/marcelle/tree/main/apps/demos/object-detection/

Since our models do not take input in ImageData format, it seems I would need to use:

const detector = onnxModel({
  inputType: 'generic',
  taskType: 'generic',
});

However both imageUpload and webcam only send streams of images in the ImageData format, so setting up a pipeline between these and detector does not seem possible.

Describe the solution you'd like
Both imageUpload and webcam should be able to send streams of images in the ImageData AND TensorLike formats.

Describe alternatives you've considered
It might be possible to make a custom prediction model using image in ImageData format as input and use it for the ONNX export. I still haven't found any relevant source for that however.

Derived streams do not preserve the hold property

Describe the bug
When a stream is transformed (e.g. using .map()), the hold property of the initial stream is not propagated to the derived stream.

Expected behavior
It would seem logical in most cases to preserve the hold property from the input stream. The behavior could be explicitly overriden by calling .hold(false) on the resulting stream.

Actual behavior
Derived stream never hold by default, we have to call .hold() on the resulting stream.

python api / backend

(Apologies if this should rather go into the discussions tab)

Hi - I came across Marcelle from the citation in Apple's paper describing their Symphony framework. I have been looking into the docs and examples, and it looks super neat! I want to use Marcelle components and write new ones with computation backed by a python kernel. Python frameworks like Streamlit and Gradio have underpowered custom components or don't document them well.

I see documentation related to the python API but can't seem to find the related code. The example project iris-python only seems to run training offline in python and saving the model artifact rather than something that updates on interaction. Does the project scope includes bidirectional comms with python?

Cannot start dev server due to Vite dependency issue

Describe the bug
Although installing the dependencies generated by Marcelle's CLI tool using pnpm or yarn works without any peer dependency issues (npm recognizes the problem), trying to run the dev server will result in an error due to Vite.js version in the generated package.json.

To Reproduce
Steps to reproduce the behavior:

  1. Run the CLI tool to generate a SvelteKit Project + TypeScript
  2. yarn install or pnpm install, npm seems to recognize the peer dependency error
  3. yarn run dev (also tried the yarn run dev -- --open command` but same error thrown)

Expected behavior
Vite should start the dev server.

Actual behavior
A Vite dependency error is thrown
image

Additional Information
Potential fix: Bumping Vite version to v4.1.1 fixed the errors and the app behaves as expected.

TypeScript decorators break tree-shaking

Describe the bug
Tree-shaking is currently broken due to the internal use of TypeScript decorators.

To Reproduce
Create a Marcelle application with a build tool such as vite and inspect the produced bundle size and contents.

Expected behavior
The bundle size should be smaller. In particular, dependencies such as onnxjs are systematically included in the final bundle, while they should be removed.

Actual behavior
Huge bundle sizes, with unnecessary dependencies

Additional Information
This seems to be inherent to Typescript decorators. We should probably avoid using decorators at all in the library.

Import causes Module not found Error

Describe the bug
After installing and importing into project, get this error:
Module not found: Error: Default condition should be last one

To Reproduce
Steps to reproduce the behavior:

  1. pnpm install @marcellejs/core --save
  2. setup project with webpack and ts
  3. import * as marcelle from '@marcellejs/core'
  4. run with webpack-dev-server
  5. See error

Additional Information
OS: Linux
Node: v16.18.0 (npm v8.19.2)
webpack-dev-server: 4.11.1

Could be fixed by changing the order of export in the marcelle's package.json in node_modules

Switch app generation to create-*, CLI should be local to a package

Is your feature request related to a problem? Please describe.
Currently app generation is done using @marcellejs/cli, which requires global install. This means that users must have an up to date version of the CLI on their system, which is not always the case. The version of @marcellejs/core installed might not always be compatible.

Describe the solution you'd like
I suggest switching the app generation to something like create-react-app or create-svelte. We would use the following command to create a new marcelle application:

npm init marcelle-app my-app # or yarn create marcelle-app my-app

This way, users would always use the latest version of the app generator, and maintenance would be easier.

Regarding the CLI for generating components and backends, it could be integrated as a devDependency in the user's app. It could be either:

  1. Using hygen directly (with hygen templates stored locally in the app)
npx hygen component new my-component
  1. A dedicated CLI package with a bin called marcelle, so that we keep a similar interface as before, except prepending npx
npx marcelle generate component

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.