Commit 5288d9be authored by Valentin Reis's avatar Valentin Reis

[fix] minor changes for bandit: loss normalization, use of env vars.

parent 31299dfb
......@@ -57,7 +57,7 @@ class Application(object):
def update_progress(self, msg):
"""Update the progress tracking."""
self.progress = self.progress + float(msg['payload'])
self.progress = self.progress + float(msg['payload'])/10000.
def reset_progress(self):
"""Update the progress tracking."""
......
......@@ -269,7 +269,7 @@ def runner(power_discretization=4,
log_power=log_power)
daemon.main()
if log_power!=None:
close(log_power,'r')
log_power.close()
except:
if log_power!=None:
close(log_power,'r')
log_power.close()
"""Various clients for system utilities."""
import collections
import logging
import os
import xml.etree.ElementTree
import tornado.process as process
import subprocess
......@@ -42,7 +43,12 @@ class NodeOSClient(object):
def __init__(self):
"""Load client configuration."""
self.prefix = "argo_nodeos_config"
if 'ARGO_NODEOS_CONFIG' in os.environ:
logger.warning("NodeOSClient: bypassing argo_nodeos_config with %s\n" %os.environ['ARGO_NODEOS_CONFIG'])
self.prefix=os.environ['ARGO_NODEOS_CONFIG']
else:
logger.warning("NodeOSClient: using argo_nodeos_config from path")
self.prefix = "argo_nodeos_config"
def getavailable(self):
"""Gather available resources."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment