Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

support arbitrary weights for individual streams #15

Open
proteneer opened this issue May 20, 2014 · 2 comments
Open

support arbitrary weights for individual streams #15

proteneer opened this issue May 20, 2014 · 2 comments

Comments

@proteneer
Copy link

Currently managers can already specify weights of individual targets. Next up is to allow managers to specify the weights of individual streams. It turns out prioritizing longest streams is just a special case of arbitrary weights, where weights is set equal to total number of completed frames. In particular, this will allow F@H managers to actively promote certain streams that are visiting regions of phase space of interest to them.

@proteneer proteneer added this to the Public Release milestone Jun 30, 2014
@proteneer
Copy link
Author

This is a rather non-trivial feature to implement. Currently assignments are implemented as a priority queue, where the priority is equal to the number of frames. That is, we prefer longer streams over shorter streams. Unfortunately, a queue structure is not sufficient to support relative weights.

A random weighted sample is best implemented via computation of the normalized cumulative density of the weights, followed by a random sample between [0,1].

In addition, this is complicated by the fact that these weights are only used during assignment time, and that if a CPU core ends up taking a high weight stream, you'd need to force a disengage server-side.

The main use cases I see this are:

  1. Adding new streams to an existing target that needs a bit more sampling relative to other existing streams without stopping all the other streams.
  2. Lowering the priority of an existing stream that has too much sampling (though you might as well as just stop the relevant stream for this).

If you need more fine grained control, use the existing siegetank stream.stop() and stream.start() methods that forces a core to disengage from a stream and prevents/allows future assignments. So using these two methods, you can more or less get the desired ratio of frames by stopping streams that have too many frames. Albeit you'd need to do this proactively.

What are your use cases?

@proteneer
Copy link
Author

(PS this is actually further complicated by the fact that streams's weights are relative only to other streams on the same SCV).

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

No branches or pull requests

1 participant