[mlpack-git] [mlpack] LoadSave Unit test fails Windows x64 (#468)

Ryan Curtin notifications at github.com
Mon Nov 23 08:37:04 EST 2015


I did a bit of thinking and digging, and I wanted to see if you are willing to try two things:

 * opening the file as binary on Windows.  This can be done by modifying `load_impl.hpp` at line 64 to be something like this:

```
#ifdef _WIN32
  stream.open(filename.c_str(), std::fstream::in | std::fstream::binary);
#else
  stream.open(filename.c_str(), std::fstream::in);
#endif
```

You'd have to make that change for a couple of functions; both overloads of `Load()` in `load_impl.hpp` and both overloads of `Save()` in `save_impl.hpp`.  If that fixes your load issues and the SerializationTest output, we can take that as a fix.  Or...

 * Change the condition in `guess_file_type()` inside of Armadillo.  It seems possible to me that the '\r' character is not being stripped properly when read under Windows, and this is causing the file to be detected as binary.  So modifying the conditional that I mentioned in the previous comment could fix that.

Like I've mentioned before, I don't have a good working Windows system (and at the current moment I don't have time to set one up), so unfortunately fixing this one will either be up to you (but I'm happy to help how I can!) or someone else who reads this ticket and happens to be developing on Windows.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/468#issuecomment-158934838
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151123/2249fa24/attachment.html>


More information about the mlpack-git mailing list