Coder Social home page Coder Social logo

Comments (1)

RHammond2 avatar RHammond2 commented on August 11, 2024

Hi @johnwang0576, not sure how I missed this, but in any case thanks for opening this up!

This is something that I've seen a couple of times, but stems from modifying the example workflow. In particular, sim.env.cleanup_log_files() deletes the initialized operations and events logging files, and therefore the headers contained inside. I recommend moving this to either the end of your analysis workflow, or removing it altogether if you plan to inspect the files later because sim.run() is recreating and writing to those files that have just been deleted.

Bellow, is what your example should look like to operate correctly. I'll be sure to update the documentation to be more clear about when users should and shouldn't run sim.env.cleanup_log_files().

from time import perf_counter
from wombat import Simulation
from wombat.core.library import load_yaml, DINWOODIE

library_path = DINWOODIE
config = load_yaml(library_path / "project/config", "base.yaml")
sim = Simulation.from_config(config)

start = perf_counter()
sim.run()
end = perf_counter()
timing = end - start
print(f"Run time: {timing / 60:,.2f} minutes")

sim.env.cleanup_log_files()  #  delete the events and operations CSV files

from wombat.

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.