dhopp1 / nowcastlstm.jl Goto Github PK
View Code? Open in Web Editor NEWJulia wrapper for nowcast_lstm Python library. Long short-term memory neural networks for economic nowcasting.
License: Other
Julia wrapper for nowcast_lstm Python library. Long short-term memory neural networks for economic nowcasting.
License: Other
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
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.