Code Monkey home page Code Monkey logo

Comments (13)

papamarkou avatar papamarkou commented on June 10, 2024

Thanks for your feedback @scheidan. I am aware that the model parsing of the MCMC package is unfortunately broken with version 0.3.0 of Julia. I am not intervening as we agreed with @fredo-dedup to let him deal with the issue, particularly in relation to the graph model-based parsing.

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

I think the problem is related to changes in the AST for the ~ symbol in the new version of julia ( #4882 ? ) . @scheidan would it be practical for you to revert to Julia 0.2.0 ?
I'll correct this once 0.3.0 is officially out.

from klara.jl.

scheidan avatar scheidan commented on June 10, 2024

Thanks @fredo-dedup and @scidom, I appreciate your effort very much!

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

Last commit solves this issue.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

@fredo-dedup, this hasn't been resolved (this is why I am reopening the issue). This is the error I get, which seems to be a bug in the ReverseDiffSource package:

ERROR: no method start(Symbol)
 in union! at set.jl:23
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:40
 in mr_pairwise at reduce.jl:534
 in mapreduce at reduce.jl:546
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:44
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:42
 in explore at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:104
 in explore at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:83
 in map_to! at abstractarray.jl:1234
 in map at abstractarray.jl:1243
 in varGraph at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:131
 in reversediff at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:136
 in generateModelFunction at /home/theodore/.julia/v0.3/MCMC/src/parsers/modelparser.jl:73
 in MCMCLikelihoodModel at /home/theodore/.julia/v0.3/MCMC/src/modellers/MCMCLikModel.jl:93
 in model at /home/theodore/.julia/v0.3/MCMC/src/modellers/models.jl:28

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

Sorry about that @scidom. Can you tell me how it happened so that I can reproduce it ?

Thanks.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

Thanks for looking into it @fredo-dedup. I am not in front of my laptop to copy-paste the relevant code, it's simply the first example in readme (mymodel3).

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

I can't reproduce your error message. I have tried both master and 0.0.5 - tagged versions of MCMC and all the tests pass.

Here is the output of Pkg.status() :

Pkg.status()
3 required packages:
 - Gadfly                        0.2.5
 - IJulia                        0.1.4
 - PyPlot                        1.2.2
28 additional packages:
 - ArrayViews                    0.4.1
 - BinDeps                       0.2.12
 - Blocks                        0.0.2
 - Codecs                        0.1.0
 - Color                         0.2.8
 - Compose                       0.1.27
 - DataArrays                    0.1.3
 - DataFrames                    0.5.3
 - Datetime                      0.1.2
 - Distance                      0.3.1
 - Distributions                 0.4.2
 - GZip                          0.2.12
 - Hexagons                      0.0.1
 - Iterators                     0.1.2
 - JSON                          0.3.5
 - Loess                         0.0.2
 - MCMC                          0.0.5+             master
 - Nettle                        0.1.3
 - NumericExtensions             0.6.0
 - NumericFuns                   0.2.1
 - PDMats                        0.1.1
 - PyCall                        0.4.2
 - REPLCompletions               0.0.0
 - ReverseDiffSource             0.0.2
 - SortingAlgorithms             0.0.1
 - StatsBase                     0.3.9
 - URIParser                     0.0.1
 - ZMQ                           0.1.9

and versioninfo() :

Julia Version 0.3.0-prerelease
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm

Do you have the correct version of ReverseDiffSource (0.0.2) ?

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

Hi @fredo-dedup, thanks for looking into this. I have the latest Julia (based on its latest commit on Github), and the packages updated to their latest version (ReverseDiffSource is indeed v0.0.2). Trying the example

using MCMC

modelexpr = quote
  v ~ Normal(0, 1)
end

mcmodel = model(modelexpr, v=ones(3))

I get the error

ERROR: no method start(Symbol)                                                                                                                                                                  
 in union! at set.jl:23                                                                                                                                                                         
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:40                                                                                                            
 in mr_pairwise at reduce.jl:534                                                                                                                                                                
 in mapreduce at reduce.jl:546
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:44
 in getSymbols at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:42
 in explore at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:104
 in explore at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:83
 in map_to! at abstractarray.jl:1234
 in map at abstractarray.jl:1243
 in varGraph at /home/theodore/.julia/v0.3/ReverseDiffSource/src/pass1.jl:131
 in reversediff at /home/theodore/.julia/v0.3/ReverseDiffSource/src/reversediff.jl:136
 in generateModelFunction at /home/theodore/.julia/v0.3/MCMC/src/parsers/modelparser.jl:73
 in MCMCLikelihoodModel at /home/theodore/.julia/v0.3/MCMC/src/modellers/MCMCLikModel.jl:93
 in model at /home/theodore/.julia/v0.3/MCMC/src/modellers/models.jl:28

Here is what I get via Pkg.versioninfo():

Julia Version 0.3.0-prerelease+2118
Commit 6ea7022* (2014-03-19 21:35 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i3 CPU       M 370  @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

and here is what Pkg.status() gives me:

12 required packages:
 - DualNumbers                   0.0.1
 - GLM                           0.3.0
 - Gadfly                        0.2.5
 - IJulia                        0.1.4
 - MAT                           0.2.3
 - NLopt                         0.0.3
 - Optim                         0.2.0
 - ProgressMeter                 0.0.1
 - ReverseDiffSource             0.0.2
 - TimeSeries                    0.3.7
 - Vega                          0.0.0
 - Winston                       0.9.0
33 additional packages:
 - ArrayViews                    0.4.1
 - BinDeps                       0.2.12
 - Blocks                        0.0.2
 - Cairo                         0.2.12
 - Calculus                      0.1.3
 - Codecs                        0.1.0
 - Color                         0.2.8
 - Compose                       0.1.27
 - DataArrays                    0.1.4
 - DataFrames                    0.5.3
 - Datetime                      0.1.2
 - Distance                      0.3.1
 - Distributions                 0.4.2
 - GZip                          0.2.12
 - HDF5                          0.2.20
 - Hexagons                      0.0.1
 - IniFile                       0.2.2
 - Iterators                     0.1.2
 - JSON                          0.3.5
 - Loess                         0.0.2
 - MCMC                          0.0.3+             master
 - Nettle                        0.1.3
 - NumericExtensions             0.6.0
 - NumericFuns                   0.2.1
 - Options                       0.2.2
 - PDMats                        0.1.1
 - REPLCompletions               0.0.0
 - SortingAlgorithms             0.0.1
 - StatsBase                     0.3.9
 - Tk                            0.2.11
 - URIParser                     0.0.1
 - ZMQ                           0.1.9
 - Zlib                          0.1.5

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

Sorry for the delay @scidom, I am still looking into it but can't reproduce at this moment. I am trying to see if it is related to a specific julia version.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

No worries @fredo-dedup, I think you are right, it has to do with the version of Julia. To double check whether this is true, I will try later to use an older version of Julia in order to see if the error vanishes.

from klara.jl.

fredo-dedup avatar fredo-dedup commented on June 10, 2024

I finally found it ( you can no longer create sets with Set(a,b,c,d) ).
I upgraded ReverseDiffSource to 0.0.3 (the pull request in METADATA is pending), updated the REQUIRE of MCMC, and removed commented out tests in runtests.jl.

Let me know if it works for you (tested on my side with the latest julia ), I won't close this issue until then. Thanks.

from klara.jl.

papamarkou avatar papamarkou commented on June 10, 2024

Yes, this works now, I don't get the above error anymore. Thanks @fredo-dedup, I will now close this issue.

from klara.jl.

Related Issues (20)

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.