Giter Site home page Giter Site logo

Comments (4)

dafrose avatar dafrose commented on May 25, 2024

I would like to extend this proposal and state the goal that every object from frontend to backend have file i/o methods. Where possible, these should include yaml readers/writers, but pickle should be available everywhere. Additionally I would like to introduce a mode attribute to the to_file/from_file methods to state whether the target/source file is in yaml/pickle or whatever other format we might introduce in the future. Dedicated methods for different file formats might still exist, but this way we have a single point of entry for saving and loading progress.

from pyrates.

dafrose avatar dafrose commented on May 25, 2024

commits 572f127 and fd9892b fix the current implementation of IR pickling and allow to pickle IR instances. In principle all kinds of IR instances are supported, but only CircuitIR is actively tested.

  • Still need to test, whether backend stuff is supported.
  • Also need to include yaml i/o into these functions

from pyrates.

dafrose avatar dafrose commented on May 25, 2024

It might be useful to implement dependent tests, where test 1 creates a network (with backend) and saves the result to file; and test 2 loads that from file and computes. That might cover some relevant use cases.

from pyrates.

Richert avatar Richert commented on May 25, 2024

I implemented yaml-based i/o methods that allow to save AbstractTemplate instances to a yaml file such that it can be loaded back into Python via AbstractTemplate.from_yaml again. Further I/O methods do not make much sense after the backend restructuring, in my opinion, since intermediate representation always have to be build on the fly during a new simulation/file generation call.

from pyrates.

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.