Skip to content

Commit

Permalink
fix(csvts): correctly store and print test file names
Browse files Browse the repository at this point in the history
  • Loading branch information
fantes authored and sileht committed Oct 6, 2020
1 parent e54cfda commit 12d4639
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/backends/torch/torchinputconns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -995,9 +995,14 @@ namespace dd
long int tstart = 0;
if (static_cast<long int>(seq.size()) < _timesteps)
{
_tilogger->warn(
"file " + _fnames[vecindex]
+ " does not contains enough timesteps, discarding");
if (use_csvtsdata_test)
_tilogger->warn(
"file " + _test_fnames[vecindex]
+ " does not contains enough timesteps, discarding");
else
_tilogger->warn(
"file " + _fnames[vecindex]
+ " does not contains enough timesteps, discarding");
continue;
}
for (; tstart + _timesteps < static_cast<long int>(seq.size());
Expand Down
5 changes: 4 additions & 1 deletion src/csvtsinputfileconn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ namespace dd
_cifc->read_csv(fname, true);
_cifc->_csv_test_fname = testfname;
_cifc->push_csv_to_csvts(is_test_data);
_cifc->_fnames.push_back(fname);
if (is_test_data)
_cifc->_test_fnames.push_back(fname);
else
_cifc->_fnames.push_back(fname);
return 0;
}
else
Expand Down
1 change: 1 addition & 0 deletions src/csvtsinputfileconn.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ namespace dd
std::vector<std::vector<CSVline>> _csvtsdata;
std::vector<std::vector<CSVline>> _csvtsdata_test;
std::vector<std::string> _fnames;
std::vector<std::string> _test_fnames;

int _boundsprecision = 15;
};
Expand Down

0 comments on commit 12d4639

Please sign in to comment.