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

RFC on strategy/design doc for Tisane R #36

Open
emjun opened this issue Jan 19, 2022 · 2 comments
Open

RFC on strategy/design doc for Tisane R #36

emjun opened this issue Jan 19, 2022 · 2 comments
Assignees
Labels
rfc request for comments

Comments

@emjun
Copy link
Owner

emjun commented Jan 19, 2022

Goal: Create an R version of Tisane

Considerations:

  • Keep user-facing API as R-idiomatic as possible
  • Reduce duplicate maintenance efforts. So that changes to Tisane in Python will improve/update Tisane R package.

Pipeline at 10,000 ft

R API (user input code) --> Python script --> JSON --> Tisane GUI --> R Code (output statistical modeling code)

Note: The new part is R API --> Python script. The rest is already how Tisane (Python implementation) works.
Put another way, the goal is to "transpile" R into Python.

How to compile/transpile R into Python?

  • Strategy 1: Build up internal graph IR in R, traverse graph to produce Python code
  • Strategy 2: Parse R script into AST, traverse AST, generate Python code from AST
  • Strategy 3: Build up internal graph IR in R, output graph IR in some format (maybe DOT or something like that), read in graph output, write Python code from graph

In all of these: Key thing is to control Python script execution through a bash script, which we can call from R.

Current/next steps

As of January 18, 2022: I opt for Strategy 1 first because (i) I suspect the syntax of Tisane is likely to change more than the graph IR and (ii) outputting the graph to read it back in might not be necessary.

TODOS related to Tisane R:

@emjun emjun added the rfc request for comments label Jan 19, 2022
@emjun
Copy link
Owner Author

emjun commented Jan 19, 2022

@audreyseo @shreyashnigam Did this capture our discussion? Anything you would change/add?

@shreyashnigam
Copy link
Collaborator

RFC looks good. Nothing to add

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

No branches or pull requests

3 participants