Giter Club home page Giter Club logo

Comments (3)

justinsalamon avatar justinsalamon commented on May 27, 2024

Yes, let's add this! A few comments:

  • Scaper._instantiate() also touches self.duration. It also calls self._instantiate_event() which touches self.bg_path, self.fg_path, self.bg_labels, self.fg_labels, self.protected_labels and self.duration. Then there's _generate_audio() which touches pretty much all other parameters in self.*. All this to say, there's a big difference between the notion of resetting the Scaper object and just resetting the event specifications, and we should limit ourselves to the latter in this context.
  • It occurred to me that there's a valid (and common) use case for wanting to only reset either the foreground or background spec, for example when you want the same background but different foreground events, and vice versa (e.g. for model evaluation ablations). So how about we break this down into reset_fg_event_spec() and reset_bg_evet_spec()?
  • The implementation, as you've noted, is trivial. Where I think we need to spend time/effort is in documenting the behavior of these functions in docstrings, as well as explaining and demonstrating with examples in the documentation how to use them.
  • In terms of tests, the trivial ones to add are to check that the lists have been set to empty lists. Next, we can create a Scaper object and add events to it and then reset the specs, and compare it to another objects that hasn't had events added to it, and they should be identical. Finally, we could have a test that creates a Scaper object, adds events to it and instantiates a JAMS file. Then we reset the event specs, start it off with the same seed again, repeat the process and instantiate another JAMS. The two JAMS files should be identical.
  • This just made me thing: in additional to providing a random seed as part of the init function, do we also want to add a function Scaper.set_random_seed() in case someone wants to change the random seed of an already existing Scaper object?

How does this all sound?

from scaper.

pseeth avatar pseeth commented on May 27, 2024

All sounds good. I'll fold this into #54!

from scaper.

justinsalamon avatar justinsalamon commented on May 27, 2024

Added via #54

from scaper.

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.