def main(_): logging.set_verbosity(logging.INFO) tf.compat.v1.enable_resource_variables() tf.compat.v2.enable_v2_behavior() gin_file = FLAGS.gin_file gin_file.append(os.path.join(FLAGS.root_dir, "train/operative_config-0.gin")) gin.parse_config_files_and_bindings(gin_file, None, skip_unknown=True) root_dir = FLAGS.root_dir checkpoint_no = FLAGS.checkpoint collect_data = FLAGS.collect_data with gin.unlock_config(): gin.bind_parameter('%ROOT_DIR', root_dir) agent_exporter = exporter.Exporter(root_dir, checkpoint_no, collect_data=collect_data, verify_restore_success=True)
import exporter exp = exporter.Exporter() exp.export_rule()
import fmt import errors import logger import reporter import exporter import uploader import calculator import idc from CGM import cgm from Stick import stick from Pump import pump from Profiles import bg, basal, net, isf, csf, iob, cob, targets # Define instances Logger = logger.Logger("loop") Exporter = exporter.Exporter() Uploader = uploader.Uploader() # CLASSES class Loop(object): def __init__(self): """ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INIT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ # Initialize start/end times self.t0 = None self.t1 = None