GithubHelp home page GithubHelp logo

Comments (4)

mattjj avatar mattjj commented on May 18, 2024 1

Thanks so much for digging in! Kayhan, good to hear from you!

Looks like you’ve already found this code is currently only Python 2.7 compatible.

The fmap stuff is vestigial (from the fmap-everywhere branch of Autograd, which I meant to remove). I’ll take a look at that when I can.

from autoconj.

dwrtz avatar dwrtz commented on May 18, 2024

I was able to make some progress by using the latest from autograd (https://github.com/HIPS/autograd), which now has the toposort function. Unfortunately I still have a problem when trying to run one of the examples:

Traceback (most recent call last):
File ".\kalman_filter.py", line 97, in
app.run(main)
File "C:\ProgramData\Anaconda3\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "C:\ProgramData\Anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File ".\kalman_filter.py", line 79, in main
marginal = make_marginal_fn()
File ".\kalman_filter.py", line 46, in make_marginal_fn
log_p_x1_y1, 0, SupportTypes.REAL, *([1.] * 4))
File "C:\autoconj\autoconj\conjugacy.py", line 213, in complete_conditional
_trace_and_analyze(log_joint_fun, argnum, *args))
File "C:\autoconj\autoconj\conjugacy.py", line 157, in _trace_and_analyze
graph = make_expr(log_joint_fun, *args)
File "C:\autoconj\autoconj\tracers.py", line 88, in make_expr
used_start_nodes = {n for n in toposort(end_node, lambda n: n.parents)
File "C:\autoconj\autoconj\tracers.py", line 88, in
used_start_nodes = {n for n in toposort(end_node, lambda n: n.parents)
File "C:\autograd\autograd\util.py", line 25, in toposort
if node in child_counts:
TypeError: unhashable type: 'ExprNode'

from autoconj.

dwrtz avatar dwrtz commented on May 18, 2024

Switching to python 2.7 resolved this for me.

from autoconj.

kayhan-batmanghelich avatar kayhan-batmanghelich commented on May 18, 2024

@dwrtz I agree. It resolves some but not all problems. For example, this:

    20 from autograd import grad
     21 from autograd import value_and_grad
---> 22 from autograd import fmap_util
     23
     24 from . import conjugacy

ImportError: cannot import name fmap_util

from autoconj.

Related Issues (2)

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.