Skip to content

Readme example is not working #7

Description

@yohankar

Hi,

Thanks for making this package available.

Just trying to get the the readme example (scripts/readme_example.jl) running in a fresh copy. I'm facing some outdated dependency issues. Managed to get around with some but facing other errors. I'm a newbie to Julia and related ecosystem. Not sure I'm doing something wrong.

Julia v1.11.6, Used the project environment to install dependencies.

Issues encountered and things I tried:

  1. install_extras() by default doesn't work
    Getting errors with "MineralExploration".

    Flux [587475ba] log:
     ├─possible versions are: 0.4.1 - 0.16.5 or uninstalled
     ├─restricted to versions * by BetaZero [c2a2f090], leaving only versions: 0.4.1 - 0.16.5
     │ └─BetaZero [c2a2f090] log:
     │   ├─possible versions are: 0.1.0 or uninstalled
    

    Skipped this step by manually installing LightDark, RemoteJobs, ParticleBeliefs packages in submodule directory.

  2. ERROR: LoadError: Please implement 'BetaZero.input_representation(belief::YourBeliefType)'
    Change the BetaZero.input_representation to

    function BetaZero.input_representation(b::WeightedParticleBelief{LightDarkState})
        # Function to get belief representation as input to neural network. 
        μ, σ = mean_and_std(s.y for s in ParticleFilters.particles(b), w=ParticleFilters.weights(b))
        return Float32[μ, σ]
    end
    
  3. In BetaZeroNetworkParameters, parameter optimizer is ambiguous and change it to Flux.Adam

  4. Changed Flux.Data.DataLoader to Flux.DataLoader

  5. ERROR: LoadError: Invalid input to 'update!' update!(state, model, grad)' needs 'state = Flux.setup(opt, model)'.
    This is where I got stuck. I assume installed Flux version is not compatible with the current code (Flux v0.16.5). When changed Flux.update! parameters, got more errors from the network training loop (line 330 of src/neural_network.jl).

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions