Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in stats manager, booking_duration=None is not supported #16

Open
francolq opened this issue Apr 15, 2016 · 1 comment
Open

in stats manager, booking_duration=None is not supported #16

francolq opened this issue Apr 15, 2016 · 1 comment

Comments

@francolq
Copy link

This code from the documentation is not working because of this:

>>> from featureforge.experimentation.stats_manager import StatsManager
>>> sm = StatsManager(None, 'Your-database-name')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/francolq/.virtualenvs/lq-research/local/lib/python2.7/site-packages/featureforge/experimentation/stats_manager.py", line 62, in __init__
    self.booking_delta = timedelta(seconds=booking_duration)
TypeError: unsupported type for timedelta seconds component: NoneType
@jbigatti
Copy link
Contributor

jbigatti commented Oct 14, 2016

Talking with @jmansilla we have decided to make a change in the StatsManager API.
Until now we have:
def __init__(self, booking_duration, db_name, db_uri=None, keep_running_on_errors=True)

The idea is move db_name in first place and make booking_duration optional with None as default value. If booking_duration is not provided, it will mean that the booking duration will not be take in count and the ticket cannot be stolen by other process.
Finally the new interface:
def __init__(self, db_name, booking_duration=None, db_uri=None, keep_running_on_errors=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants