Giter VIP home page Giter VIP logo

autoconj's Introduction

Google Research

This repository contains code released by Google Research.

All datasets in this repository are released under the CC BY 4.0 International license, which can be found here: https://creativecommons.org/licenses/by/4.0/legalcode. All source files in this repository are released under the Apache 2.0 license, the text of which can be found in the LICENSE file.


Because the repo is large, we recommend you download only the subdirectory of interest:

SUBDIR=foo
svn export https://github.com/google-research/google-research/trunk/$SUBDIR

If you'd like to submit a pull request, you'll need to clone the repository; we recommend making a shallow clone (without history).

git clone [email protected]:google-research/google-research.git --depth=1

Disclaimer: This is not an official Google product.

Updated in 2023.

autoconj's People

Contributors

matthewmackay avatar mattjj 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoconj's Issues

Python 3 compatibility

In Python 3:

  1. parens are not allowed around lambda parameters
  2. apply was removed from the language
  3. reduce was moved into functools to encourage the use of comprehensions instead

flake8 testing of https://github.com/google-research/autoconj on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./autoconj/conjugacy.py:250:28: E999 SyntaxError: invalid syntax
  make_mean_init = (lambda (i, normalizer): lambda scale=1.:
                           ^
./autoconj/tracers.py:388:18: F821 undefined name 'apply'
  fun.fmap_out = apply
                 ^
./autoconj/tracers.py:516:10: F821 undefined name 'reduce'
  return reduce(np.add, args)
         ^
./autoconj/matchers.py:89:25: F821 undefined name 'reduce'
def _set(*elts): return reduce(operator.or_, map(_singleton, elts))
                        ^
./autoconj/matchers.py:248:51: F821 undefined name 'list_patterns'
    lambda pat: match_list(*map(make_combinators, list_patterns(pat))))
                                                  ^
./examples/mixture_of_gaussians_variational.py:123:46: F821 undefined name 'itr'
    plt.savefig('/tmp/gmm_{:04d}.png'.format(itr))
                                             ^
./examples/mixture_of_gaussians_variational_tensorflow.py:129:46: F821 undefined name 'itr'
    plt.savefig('/tmp/gmm_{:04d}.png'.format(itr))
                                             ^
1     E999 SyntaxError: invalid syntax
6     F821 undefined name 'reduce'
7

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

ImportError: cannot import name 'toposort'

Hey guys,

Very nice work!

It seems some of the functions are missing. Here is an example:

     44 from autograd.tracer import Node
---> 45 from autograd.util import toposort
     46 from autograd.util import subvals
     47 from autograd import core

ImportError: cannot import name 'toposort'

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.