Giter VIP home page Giter VIP logo

Comments (4)

richardjgowers avatar richardjgowers commented on July 30, 2024

I started playing with this, and one big change is that we'd have to make the FEMap object immutable. Is this an ok choice for this? @dwhswenson opinions?

The alternative would be we'd just make the to_dict/from_dict not via gufe.

from cinnabar.

ijpulidos avatar ijpulidos commented on July 30, 2024

Do we need to make it gufe tokenizable or just serializable? I think we would like to make the object easy to extend for the "live networks" plan that we have for alchemiscale and getting results from it. I guess this could be done with immutable objects (creating a new one every time), but may not be necessary.

from cinnabar.

dwhswenson avatar dwhswenson commented on July 30, 2024

I'm not sure enough about the use cases here. GufeTokenizable adds a few potential conveniences (versioning of serialization, ease of use when saving to gufe-based storage, a few useful points on provenance, etc). But I'm not familiar enough with the needs of cinnabar users to say whether that is worth dropping mutability.

I'll argue strongly for immutable objects if they're likely to be stored as part of a larger database. If the serialization is always directly to a single file for that object, I feel like mutability causes fewer problems (it is understood that you're overwriting the old file). However, when you save into a larger database, mutability requires that the database manage updates, and you lose provenance tracking. That mainly matters if you're using objects that are then themselves used as inputs elsewhere; I'm not sure how much that would happen with an FEMap.

from cinnabar.

richardjgowers avatar richardjgowers commented on July 30, 2024

Immutable is a bit misleading, it just means that the pattern for updating a network behaves differently

# mutable
m = FEMap()

for line in myfile:
    m.add_absolute_measurement(line)

# immutable
m = FEMap()
for line in myfile:
    m = m.add_absolute_measurement(line)

Maybe a simple to/from dict is enough for FEMap though

from cinnabar.

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.