mikeizbicki / HLearn

Homomorphic machine learning
Other
1.62k stars 134 forks source link

hlearn-allknn can't be built because `shuffle` function can't be found #60

Closed cdepillabout closed 9 years ago

cdepillabout commented 9 years ago

When trying to build HLearn from master (b32ff138434), it is falling when trying to build the hlearn-allknn binary:

Building HLearn-2.0.0.0...
Preprocessing library HLearn-2.0.0.0...
[ 1 of 13] Compiling HLearn.Data.SpaceTree.CoverTree.Unsafe ( src/HLearn/Data/SpaceTree/CoverTree/Unsafe.hs, dist/build/HLearn/Data/SpaceTree/CoverTree/Unsafe.o )
[ 2 of 13] Compiling HLearn.Models.Distributions ( src/HLearn/Models/Distributions.hs, dist/build/HLearn/Models/Distributions.o )

src/HLearn/Models/Distributions.hs:72:10: Warning:
    No explicit implementation for
      ‘ones’
    In the instance declaration for ‘FreeModule (Moments v)’
[ 3 of 13] Compiling HLearn.Data.SpaceTree ( src/HLearn/Data/SpaceTree.hs, dist/build/HLearn/Data/SpaceTree.o )
[ 4 of 13] Compiling HLearn.Data.SpaceTree.Algorithms ( src/HLearn/Data/SpaceTree/Algorithms.hs, dist/build/HLearn/Data/SpaceTree/Algorithms.o )
[ 5 of 13] Compiling HLearn.Data.SpaceTree.Algorithms_Specialized ( src/HLearn/Data/SpaceTree/Algorithms_Specialized.hs, dist/build/HLearn/Data/SpaceTree/Algorithms_Specialized.o )
[ 6 of 13] Compiling HLearn.Data.SpaceTree.CoverTree ( src/HLearn/Data/SpaceTree/CoverTree.hs, dist/build/HLearn/Data/SpaceTree/CoverTree.o )
[ 7 of 13] Compiling HLearn.Data.SpaceTree.CoverTree_Specialized ( src/HLearn/Data/SpaceTree/CoverTree_Specialized.hs, dist/build/HLearn/Data/SpaceTree/CoverTree_Specialized.o )
[ 8 of 13] Compiling HLearn.History.Timing ( src/HLearn/History/Timing.hs, dist/build/HLearn/History/Timing.o )
[ 9 of 13] Compiling HLearn.Data.LoadData ( src/HLearn/Data/LoadData.hs, dist/build/HLearn/Data/LoadData.o )
[10 of 13] Compiling HLearn.History   ( src/HLearn/History.hs, dist/build/HLearn/History.o )
[11 of 13] Compiling HLearn.Optimization.Univariate ( src/HLearn/Optimization/Univariate.hs, dist/build/HLearn/Optimization/Univariate.o )
[12 of 13] Compiling HLearn.Optimization.Multivariate ( src/HLearn/Optimization/Multivariate.hs, dist/build/HLearn/Optimization/Multivariate.o )
[13 of 13] Compiling HLearn.Classifiers.Linear ( src/HLearn/Classifiers/Linear.hs, dist/build/HLearn/Classifiers/Linear.o )
In-place registering HLearn-2.0.0.0...
Preprocessing executable 'hlearn-allknn' for HLearn-2.0.0.0...
[1 of 2] Compiling Paths_HLearn     ( dist/build/autogen/Paths_HLearn.hs, dist/build/hlearn-allknn/hlearn-allknn-tmp/Paths_HLearn.o )
[2 of 2] Compiling Main             ( executables/hlearn-allknn/Main.hs, dist/build/hlearn-allknn/hlearn-allknn-tmp/Main.o )

executables/hlearn-allknn/Main.hs:352:34: Not in scope: ‘shuffle’

shuffle appears to be defined in src/HLearn/Evaluation/CrossValidation.hs, but CrossValidation.hs is commented out in the "exposed-modules:" section of the HLearn.cabal file:

Library
    Build-Depends:
        -- common dependencies
        base                >= 4.8 && <4.9,
        subhask             >= 0.1,

        -- control
        mtl                 >= 2.1.2,

        -- i/o
        ansi-terminal       >= 0.6.1.1,
        directory           >= 1.2,
        time                >= 1.4.2

        -- visualization
--         diagrams-svg        >= 0.6,
--         diagrams-lib        >= 1.3,
--         process             >= 1.1
--         graphviz            >= 2999.16

    hs-source-dirs:
        src

    Exposed-modules:

        HLearn.History
        HLearn.History.Timing

--         HLearn.Data.Graph
--         HLearn.Data.Image
        HLearn.Data.LoadData
        HLearn.Data.SpaceTree
        HLearn.Data.SpaceTree.CoverTree
        HLearn.Data.SpaceTree.CoverTree_Specialized
        HLearn.Data.SpaceTree.CoverTree.Unsafe
        HLearn.Data.SpaceTree.Algorithms
        HLearn.Data.SpaceTree.Algorithms_Specialized

--         HLearn.Evaluation.CrossValidation

        HLearn.Classifiers.Linear
        HLearn.Models.Distributions

        HLearn.Optimization.Multivariate
        HLearn.Optimization.Univariate

--         HLearn.Optimization.Amoeba
--         HLearn.Optimization.Conic
--         HLearn.Optimization.StepSize
--         HLearn.Optimization.StochasticGradientDescent
--         HLearn.Optimization.StepSize.Linear
--         HLearn.Optimization.StepSize.Const
--         HLearn.Optimization.StepSize.AlmeidaLanglois

    Other-modules:

    Extensions:
        FlexibleInstances
...

Some of the tests seem to make use of hlearn-allknn, so they are failing as well.

mikeizbicki commented 9 years ago

This is weird. It compiles for me just fine, but I'm not at all sure where shuffle is getting imported from anymore. The CrossValidation file is supposed to be commented out right now.

Anyways, the shuffling isn't very important, so I've just commented out that line and reuploaded.

cdepillabout commented 9 years ago

Okay, trying it again with these changes worked!

mikeizbicki commented 9 years ago

Awesome!