Search in sources :

Example 1 with QueueStatsStorageListener

use of org.deeplearning4j.ui.storage.impl.QueueStatsStorageListener in project deeplearning4j by deeplearning4j.

the class PlayUIServer method attach.

@Override
public synchronized void attach(StatsStorage statsStorage) {
    if (statsStorage == null)
        throw new IllegalArgumentException("StatsStorage cannot be null");
    if (statsStorageInstances.contains(statsStorage))
        return;
    StatsStorageListener listener = new QueueStatsStorageListener(eventQueue);
    listeners.add(new Pair<>(statsStorage, listener));
    statsStorage.registerStatsStorageListener(listener);
    statsStorageInstances.add(statsStorage);
    for (UIModule uiModule : uiModules) {
        uiModule.onAttach(statsStorage);
    }
    log.info("StatsStorage instance attached to UI: {}", statsStorage);
}
Also used : QueueStatsStorageListener(org.deeplearning4j.ui.storage.impl.QueueStatsStorageListener) UIModule(org.deeplearning4j.ui.api.UIModule) QueuePairStatsStorageListener(org.deeplearning4j.ui.storage.impl.QueuePairStatsStorageListener) StatsStorageListener(org.deeplearning4j.api.storage.StatsStorageListener) QueueStatsStorageListener(org.deeplearning4j.ui.storage.impl.QueueStatsStorageListener)

Aggregations

StatsStorageListener (org.deeplearning4j.api.storage.StatsStorageListener)1 UIModule (org.deeplearning4j.ui.api.UIModule)1 QueuePairStatsStorageListener (org.deeplearning4j.ui.storage.impl.QueuePairStatsStorageListener)1 QueueStatsStorageListener (org.deeplearning4j.ui.storage.impl.QueueStatsStorageListener)1