Code Monkey home page Code Monkey logo

Comments (3)

stulp avatar stulp commented on August 22, 2024

Thanks for pointing this out. It is good to know that someone is using the serialization functionality. To be honest, getting boost:serialization to work was a real pain, and so is keeping it running. See also the "Serialization" page in the Doxygen documentation. So I've considered disabling/replacing it several times. Now that I know people are using it, I am more motivated to maintain this feature.

Since the main use case is now to use C++ for the DMPs, and Python for the optimization
(see https://github.com/stulp/dmpbbo/blob/master/README.md#why-python-and-c)
I did indeed remove the boost serialization from the bbo and dmp_bbo modules in 1d77323 and 26f9446. This may be causing the "unregistered class" error above (i.e. your XML file may contain for instance a serialized object of the DistributionGaussian class, but this class is now no longer registered, because it is part of the bbo library).

Could you provide the XML file you are using? That would help with debugging.

from dmpbbo.

gokhansolak avatar gokhansolak commented on August 22, 2024

Thank you for your answer. I don't serialize bbo modules.

I actually solved the problem. I run diff between the old and new xml files and noticed that the new one doesn't contain DmpBbo namespace in class_name attributes. When I added the namespaces the boost::serialization worked. I also created a Gist file that adds DmpBbo:: prefix to all class names in xml files in a directory, for those who may have a similar problem.

from dmpbbo.

stulp avatar stulp commented on August 22, 2024

Thank you for sharing your solution. Good to know that it is easy to make the XML files conform to the new syntax. I've included it in the documentation in d2fe4cb

I think this change of serialization behaviour must have happened in commit fb936a2, when I moved the registering of classes from the hpp file where the class is declared into one hpp file per module. This is less elegant and less modular, but since then, serialization works more robustly, i.e. not causing as many run-time crashes as you have experienced.

from dmpbbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.