Skip to content

Conversation

@BernhardAhrens
Copy link
Collaborator

@BernhardAhrens BernhardAhrens commented Dec 27, 2025

  • steps towards integrating LSTMs into GenericHybridModels
  • works in principle
  • TODOs:
    • get rid off hardcoded in_dims and out_dims for LSTM
    • adapt for trainboard, only runs with plotting = false

@BernhardAhrens BernhardAhrens marked this pull request as draft December 27, 2025 17:16
# DimensionalData
mat = Array(Matrix(dfnot)')
da = DimArray(mat, (Dim{:col}(Symbol.(names(dfnot))), Dim{:row}(1:size(dfnot, 1))))
da = to_dimArray(dfnot)
Copy link
Member

@lazarusA lazarusA Dec 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please undo the changes to this to avoid conflicts with my other PR. I'm moving this to the documentation.


docstring = """
$(name)(NN, predictors, forcing, targets$(isempty(param_syms) ? "" : ", " * join(string.(param_syms), ", ")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your editor is somehow touching other files, without real changes.

Copy link
Collaborator Author

@BernhardAhrens BernhardAhrens Dec 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure when it came in - I suspect the formatting script

_select_time(ŷ_t::KeyedArray, time_keys) = ŷ_t(time = time_keys) # KeyedArray: () syntax - view & differentiable
_select_time(ŷ_t::AbstractDimArray, time_keys) = ŷ_t[time = At(time_keys)] # DimArray: [] syntax - copy & differentiable

function assemble_loss(ŷ, y::Union{KeyedArray{T, 3}, AbstractDimArray{T, 3}}, y_nan, targets, loss_spec) where {T}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my original thinking for assemble_loss was to have only one, a generic function, and delegate/multidispatch on use cases to inner functions, such as _get_target_y, etc. We can come back to this later, once things work as expected.

df = load_timeseries_netcdf("https://github.com/bask0/q10hybrid/raw/master/data/Synthetic4BookChap.nc")

# Select a subset of data for faster execution
df = df[1:20000, :]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
df = df[1:20000, :]
df = df[1:20000, :]
first(df, 5)

same reason here. You get the gist 😄 .

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 39.26941% with 133 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.84%. Comparing base (dc0d14e) to head (aff68de).

Files with missing lines Patch % Lines
src/train.jl 28.16% 51 Missing ⚠️
src/models/NNModels.jl 42.85% 36 Missing ⚠️
src/utils/tools.jl 31.81% 30 Missing ⚠️
src/utils/compute_loss.jl 74.19% 8 Missing ⚠️
src/EasyHybrid.jl 0.00% 3 Missing ⚠️
src/models/Respiration_Rb_Q10.jl 0.00% 2 Missing ⚠️
src/plotrecipes.jl 0.00% 2 Missing ⚠️
src/utils/io.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
- Coverage   49.27%   47.84%   -1.43%     
==========================================
  Files          33       33              
  Lines        1861     2019     +158     
==========================================
+ Hits          917      966      +49     
- Misses        944     1053     +109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BernhardAhrens
Copy link
Collaborator Author

@lazarusA Oh no more checks ;-).

@lazarusA
Copy link
Member

Wanna merge? Or maybe we should wait till tomorrow?

@BernhardAhrens
Copy link
Collaborator Author

Let's wait until tomorrow - it is still very much untested and I need to understand the code coverage 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants