Coder Social home page Coder Social logo

Comments (4)

trevorb1 avatar trevorb1 commented on June 29, 2024

Hey @HauHe! I think your original snakefile only included the preprocessing and solving? I do agree though, parallelizing the lp creation would be good. The only issue is that since we try to handle LPs that fail to build, it can be difficult because snakemake will flag them as missing input files for the solve step.

Maybe using the multiprocessing library would be a better option. But Ive never used it so I dont really know

from osemosys_step.

HauHe avatar HauHe commented on June 29, 2024

Well or we do it how I did it for solving in the old scripts and put the lo-generation into a python script that handles it and provides snakemake with an output file.

from osemosys_step.

HauHe avatar HauHe commented on June 29, 2024

@trevorb1, I'm tempted to just do this as I had it in the original scrips, i.e., have a python script handling the lp generation and call it from snakemake

from osemosys_step.

trevorb1 avatar trevorb1 commented on June 29, 2024

@HauHe, that could be a good solution!

A couple of thoughts if this is implement though:

  • Right now, if the LP generation fails, we remove the model run from the current step and all subsequent steps. I think this may be a little tricky to implement in snakemake? (Although, you have done it before, so I trust your experience!)
  • As you mentioned we can create an LP file, regardless of if it completed successfully or not, and use the --keep-going flag to deal with failed solves. However, we will also need to re-implement the logic to track which LPs failed and remove all downstream steps between snakemake and passing residual capacity.
  • Alternatively, we can use input functions probably to check if the LP is generated correctly or not, and define logic in Snakemake on what to do in each case. Im not sure what would be easier off the top of my head.
  • Also, it seems like we are going towards a point of just snakemake'ing everything? I know that that the LP generation and solving are the big components, but maybe this update deserves further discussion around how to just snakemake all logic for each step?

from osemosys_step.

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.