plai-group / daphne Goto Github PK
View Code? Open in Web Editor NEWCode for first-order probabilistic programming to continuous normalizing flow compiler.
License: Other
Code for first-order probabilistic programming to continuous normalizing flow compiler.
License: Other
Trying to install daphne
and running into issues with the python-class
generating options. If I try
lein run graph -i programs/arithmetic_circuit.daphne -o output.json
or
lein run desugar -i programs/arithmetic_circuit.daphne -o output.json
both work, and produce the correct output, but if I try
pipenv run lein run python-class -i programs/arithmetic_circuit.daphne -o autogen_arithmetic_circuit.py
I get autogen_arithmetic_circuit.py
created, but with only ""
in the file. If I try:
lein run python-class -i programs/convolution.daphne -o autogen_convolution.py
I get the error:
Syntax error (NullPointerException) compiling at (/private/var/folders/fr/c2m_v4ss6kjcbgzbqfr_z5fw0000gn/T/form-init14751265169047276845.clj:1:126).
Cannot invoke "java.util.Map$Entry.getValue()" because "e" is null
Full report at:
/var/folders/fr/c2m_v4ss6kjcbgzbqfr_z5fw0000gn/T/clojure-14375094718594195756.edn
I worry that I might be doing something pretty basic wrong...
If I have a FOPPL program containing a hash-map
, when I desugar it I get:
["hash-map", 1, 3.2, 6, 2.,]
but when I convert to a graph
I get:
["hash-map", [1, 3.2], [6, 2]]
with the difference being the internal lists in the graph
case. This difference means that I have to write two slightly different versions of an interpreter for the two cases. If I don't, the internal lists in the graph
are identified as expressions (e.g., operate '1' on '3.2') and my interpreter crashes. I can hack my way through this, but maybe the hash-maps
should be changed to be identical (and equal to the desugared case)?
I am trying to install using pipenv
and the requirements.txt
file. However, I can't seem to be able to get the older versions of torch
(1.4.0) or torchvision
(0.5.0). I get:
ERROR: No matching distribution found for torch==1.4.0
ERROR: No matching distribution found for torchvision==0.5.0
This might relate to issue #2...
Hi.
The package's result when you call it with desugar
or graph
is different when you have a hash-map.
Here are the results:
Input: (put (hash-map 6 5.3 1 3.2) 6 2)
Output of daphne(['desugar', '-i', test.daphne'])
: [['put', ['hash-map', 6, 5.3, 1, 3.2], 6, 2]]
Output of daphne(['graph','-i','test.daphne'])
: [{}, {'V': [], 'A': {}, 'P': {}, 'Y': {}}, ['hash-map', [1, 3.2], [6, 2]]]
So actually in the first case we have a list of 'hash-map', 6, 5.3, 1, 3.2], 6, 2
, but in the second case we have a list of 'hash-map', [1, 3.2], [6, 2]
Hello! When running Daphne on Windows, you need to add the kwarg 'shell=True' to the subprocess.run call in daphne.py line 23. May need to switch the subprocess run command depending on the OS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.