Beispiel #1
0
def upload_prior(ctype, config):
    fname = f'models/{ctype}/prior_stmts.pkl'
    with open(fname, 'rb') as fh:
        stmts = pickle.load(fh)
    estmts = [
        EmmaaStatement(stmt, datetime.datetime.now(), []) for stmt in stmts
    ]
    model = EmmaaModel(ctype, config)
    model.add_statements(estmts)
    model.upload_to_ndex()
Beispiel #2
0
 def make_model(self):
     """Make an EmmaaModel and upload it along with the config to S3."""
     config = self.make_config()
     em = EmmaaModel(self.name, config)
     em.stmts = self.stmts
     ndex_uuid = em.upload_to_ndex()
     config['ndex'] = {'network': ndex_uuid}
     save_config_to_s3(self.name, config)
     em.save_to_s3()