Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove native/internal LSTM model #600

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ if(MPI_ACTIVE)
add_compile_definitions(NGEN_MPI_ACTIVE)
endif()

if(LSTM_TORCH_LIB_ACTIVE)
find_package(Torch REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
endif()

find_package(SQLite3)
if(SQLite3_FOUND)
set(NGEN_WITH_SQLITE3 ON)
Expand Down Expand Up @@ -260,15 +255,6 @@ if(NGEN_ACTIVATE_ROUTING)
)
endif()

if(LSTM_TORCH_LIB_ACTIVE)
add_compile_definitions(NGEN_LSTM_TORCH_LIB_ACTIVE)
add_subdirectory("src/models/lstm")
target_link_libraries(ngen PUBLIC
NGen::models_lstm
${TORCH_LIBRARIES}
)
endif()

# For automated testing with Google Test
if(PACKAGE_TESTS)
enable_testing()
Expand Down
67 changes: 0 additions & 67 deletions data/lstm/example_lstm_realization_config.json

This file was deleted.

65 changes: 0 additions & 65 deletions data/lstm/initial_states.csv

This file was deleted.

13 changes: 0 additions & 13 deletions data/lstm/input_scaling.csv

This file was deleted.

13 changes: 0 additions & 13 deletions data/lstm/lstm_mean_std.csv

This file was deleted.

Binary file removed data/lstm/sugar_creek_trained.pt
Binary file not shown.
8 changes: 0 additions & 8 deletions include/realizations/catchment/Formulation_Constructors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#include "NetCDFPerFeatureDataProvider.hpp"
#endif

#ifdef NGEN_LSTM_TORCH_LIB_ACTIVE
#include "LSTM_Realization.hpp"
#endif

namespace realization {
typedef std::shared_ptr<Catchment_Formulation> (*constructor)(std::string, shared_ptr<data_access::GenericDataProvider>, utils::StreamHandler);

Expand All @@ -46,10 +42,6 @@ namespace realization {
#ifdef ACTIVATE_PYTHON
{"bmi_python", create_formulation_constructor<Bmi_Py_Formulation>()},
#endif // ACTIVATE_PYTHON
#ifdef NGEN_LSTM_TORCH_LIB_ACTIVE
,
{"lstm", create_formulation_constructor<LSTM_Realization>()}
#endif
};

static bool formulation_exists(std::string formulation_type) {
Expand Down
131 changes: 0 additions & 131 deletions include/realizations/catchment/LSTM_Realization.hpp

This file was deleted.

Loading