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

Pretty printing of distributions doesn't work as expected under Node 12 #933

Open
null-a opened this issue Sep 26, 2019 · 1 comment
Open
Labels

Comments

@null-a
Copy link
Member

null-a commented Sep 26, 2019

We rely on Node's custom inspect method mechanism to pretty print distributions, but it looks like this stopped working since around Node v12. The most noticeable effect of this is that when running a program such as Infer(flip) at the command line, the output will be something like {"probs":[0.5,0.5],"support":[false,true]} rather than:

Marginal:
    false : 0.5
    true : 0.5

It doesn't appear as though this machinery has been removed from Node entirely, so it might be possible to update our code to work with recent releases. (We'd probably also want to support Node < v12 too if possible.) Alternatively, we might be able to workaround this by manually calling inspect() when present on any object returned as the result of a program or passed to display(...).

@null-a null-a added the bug label Sep 26, 2019
@null-a null-a changed the title Pretty printing of distibutions doesn't work as expected under Node 12 Pretty printing of distributions doesn't work as expected under Node 12 Sep 26, 2019
@null-a
Copy link
Member Author

null-a commented Aug 21, 2020

This was also reported on the mailing list.

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

No branches or pull requests

1 participant