Git Product home page Git Product logo

Comments (10)

lvotapka avatar lvotapka commented on June 1, 2024

Hello,

First off, the model.xml is generated automatically and is not intended to be modified by hand. You should probably never modify model.xml directly, and I think the problems you saw after modifying the anchor increments came from an incorrectly constructed model.xml file.

I think we should add a warning comment in the model.xml file to keep people from modifying it. @astokely is there any way to add a comment to a serialized XML file in Abserdes?

Hopefully you saved the old model.xml file, @xfang216 , or better yet, the entire filetree for that system. The correct way to make this modification to anchor locations (or add or delete anchors) is to change the anchor settings in the input XML file and rerun prepare.py. If you run without the "-f" argument, then it will warn you that some anchors would be overwritten by adjusting anchor locations. Since you need to rerun those anchors anyways, you should be able to safely use the "-f" argument to prepare.py.

Alternatively, you could run for longer in the under-sampled anchors, although its usually a better strategy to add more anchors, as you attempted to do, in regions of the CV that are difficult to sample.

from seekr2.

xfang216 avatar xfang216 commented on June 1, 2024

Hi Lane,

Thanks for the prompt response! I will try that out.

from seekr2.

astokely avatar astokely commented on June 1, 2024

@lvotapka We could simply add a serialize and deserialize method to the Model class that raise warnings when called and then they could call abserde's serialization/deserialization method via super.

from seekr2.

lvotapka avatar lvotapka commented on June 1, 2024

@astokely Would it be possible to either pass a string to serialize() that would become a comment in the XML, or perhaps, as you said, have an attribute in the class that inherits Serializer? We probably want to call it a "comment" or a "header" instead of a "warning"

from seekr2.

astokely avatar astokely commented on June 1, 2024

Yes @lvotapka I just added an optional "xml_header" parameter to abserdes.serialize and uploaded the new version to pypi.

from seekr2.

lvotapka avatar lvotapka commented on June 1, 2024

Perfect, thanks @astokely.

from seekr2.

lvotapka avatar lvotapka commented on June 1, 2024

Just pushed a commit that adds a warning message to model.xml.

414d3ac

from seekr2.

lvotapka avatar lvotapka commented on June 1, 2024

Any updates on the success of this approach, @xfang216?

from seekr2.

xfang216 avatar xfang216 commented on June 1, 2024

Hi @lvotapka, yes, it's working now. Thanks!

from seekr2.

lvotapka avatar lvotapka commented on June 1, 2024

Glad to hear it!

from seekr2.

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.