Code Monkey home page Code Monkey logo

nowcastlstm.jl's People

Contributors

dhopp1 avatar

Watchers

 avatar

Forkers

allisterh

nowcastlstm.jl's Issues

function LSTM() not working

Hello,
I attempted to use the LSTM function with Julia 1.9.4 by following all installation steps. A test like pyimport("torch").nn.L1Loss() returns a pointer, which seems to be the expected behavior.
So, I tried running the following code:
Random.seed!(123) # For reproducibility electricity_demand = rand(100:500, 365) date = Date(2024, 1, 1):Date(2024, 12, 30) df = DataFrame(Date=date, Electricity_Demand=electricity_demand) model = LSTM(data=df, target_variable="Electricity_Demand", n_timesteps=12) # default parameters with 12 timestep history
I get the following error :
`
ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/FrancoisR/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'IndexError'>
IndexError('list index out of range')
File "/home/xxx/.local/lib/python3.9/site-packages/nowcast_lstm/LSTM.py", line 88, in init
self.dataset = self.data_setup.gen_dataset(
File "/home/xxx/.local/lib/python3.9/site-packages/nowcast_lstm/data_setup.py", line 236, in gen_dataset
if arma_models[0] is None:

Stacktrace:
[1] pyerr_check
@ ~/.julia/packages/PyCall/1gn3u/src/exception.jl:75 [inlined]
[2] pyerr_check
@ ~/.julia/packages/PyCall/1gn3u/src/exception.jl:79 [inlined]
[3] _handle_error(msg::String)
@ PyCall ~/.julia/packages/PyCall/1gn3u/src/exception.jl:96
[4] macro expansion
@ ~/.julia/packages/PyCall/1gn3u/src/exception.jl:110 [inlined]
[5] #107
@ ~/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:43 [inlined]
[6] disable_sigint
@ ./c.jl:473 [inlined]
[7] __pycall!
@ ~/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:42 [inlined]
[8] _pycall!(ret::PyObject, o::PyObject, args::Tuple{}, nargs::Int64, kw::PyObject)
@ PyCall ~/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:29
[9] pycall!(ret::PyObject, o::PyObject, args::Tuple{}, kwargs::Base.Pairs{Symbol, Any, NTuple{15, Symbol}, NamedTuple{(:data, :target_variable, :n_timesteps, :fill_na_func, :fill_ragged_edges_func, :n_models, :train_episodes, :batch_size, :decay, :n_hidden, :n_layers, :dropout, :criterion, :optimizer, :optimizer_parameters), Tuple{PyObject, String, Int64, PyObject, PyObject, Int64, Int64, Int64, Float64, Int64, Int64, Float64, PyObject, PyObject, Dict{String, Float64}}}})
@ PyCall ~/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:11
[10] #
#114
@ ~/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:86 [inlined]
[11] LSTM(; data::DataFrame, target_variable::String, n_timesteps::Int64, fill_na_func::PyObject, fill_ragged_edges_func::PyObject, n_models::Int64, train_episodes::Int64, batch_size::Int64, decay::Float64, n_hidden::Int64, n_layers::Int64, dropout::Float64, criterion::PyObject, optimizer::PyObject, optimizer_parameters::Dict{String, Float64})
@ NowcastLSTM ~/.julia/packages/NowcastLSTM/e8VJh/src/Functions.jl:86
[12] top-level scope
`

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.