Skip to content

Allow VW() instances to connect to existing VW daemons#4

Open
mokelly wants to merge 1 commit intomasterfrom
feature/3_remote-connection
Open

Allow VW() instances to connect to existing VW daemons#4
mokelly wants to merge 1 commit intomasterfrom
feature/3_remote-connection

Conversation

@mokelly
Copy link
Copy Markdown
Owner

@mokelly mokelly commented Nov 19, 2014

Addresses #3:

--VW() can connect to existing VW daemons
--daemon_mode can be used to launch a daemon VW instance and connect automatically

@mokelly mokelly mentioned this pull request Nov 19, 2014
@ztane
Copy link
Copy Markdown
Contributor

ztane commented Nov 20, 2014

Btw, given ip 10.12.34.56 and port 666, one gets:

File "wabbit_wappa/active_learner.py", line 74, in __init__
    raise
RuntimeError: No active exception to reraise

That is, raise is valid in except block only

@ztane
Copy link
Copy Markdown
Contributor

ztane commented Nov 20, 2014

Ah, also, in any prod setting, if connection to existing daemon fails, I want to get the exception instantaneously and not 5 seconds later ;)

@ztane
Copy link
Copy Markdown
Contributor

ztane commented Nov 20, 2014

thus at least

    while True:
        ...
        except socket.error:
            connection_tries += 1
            if connection_tries >= MAX_CONNECTION_TRIES:
                raise socket.error

            time.sleep(CONNECTION_WAIT)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants