geoelements / geoelements/gns

Potential Issue with input_length_sequence Implementation in meshnet.data_loader SamplesDataset Class

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
237
Forks
60
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
While reviewing the MeshNet DataLoader, specifically the SamplesDataset class, I came across a section of the code that I believe may not be functioning as intended regarding the input_length_sequence parameter. Here is a brief overview of my observations:

**Observed Behavior**
The SamplesDataset class is designed to handle sequences of input features with a specified input_length_sequence. However, upon examining the __getitem__ method, it appears that the implementation assumes input_length_sequence=1 regardless of the value provided during initialization. Here is the relevant portion of the code:

`def __getitem__(self, idx):
...
# Prepare training data. Assume `input_sequence_length`=1
positions = self._data[trajectory_idx]["pos"][time_idx - 1] # (nnode, dimension)
...
`
**Potential Issue**
The comment and subsequent lines in the __getitem__ method suggest that the code is hardcoded to handle only a single time step (input_length_sequence=1). This seems to ignore the input_length_sequence parameter provided during the initialization of the SamplesDataset class. As a result, the functionality intended to support longer input sequences may not be operational.

Contributor guide

Open the contributing guide

Research direction

Start at the SamplesDataset.__getitem__ method and trace how input_length_sequence is initialized and used when selecting positions from the trajectory data. Confirm the behavior for values greater than one; done means the requested input sequence length is honored rather than assuming a single time step.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.