Exemple #1
0
def init_system(path_to_serialized_model, create_reporting=False):
    print_md('Loading: *' + str(path_to_serialized_model) + "*")
    sl = time.time()
    network = fieldnetwork.deserialize_network(path_to_serialized_model)
    store_client = StoreHandler()
    api = API(network=network, store_client=store_client)
    if create_reporting:
        reporting = Report(network)
    api.helper.help()
    el = time.time()
    print("Took " + str(el - sl) + " to load model")
    return api, reporting
 def test_compute_statistics(self):
     r = Report(self.network)
     ncols = r.num_columns
     ntables = r.num_tables
     ncontent = r.num_content_sim_relations
     nschema = r.num_schema_sim_relations
     npkfk = r.num_pkfk_relations
     print("Num cols: " + str(ncols))
     print("Num tables: " + str(ntables))
     print("Num content sim relations: " + str(ncontent))
     print("Num schema sim relations: " + str(nschema))
     print("Num PKFK relations: " + str(npkfk))
Exemple #3
0
def __init_system(path_to_serialized_model, create_reporting=True):
    print_md('Loading: *' + str(path_to_serialized_model) + "*")
    sl = time.time()
    network = fieldnetwork.deserialize_network(path_to_serialized_model)
    api = oldAPI(network)
    if create_reporting:
        reporting = Report(network)
    api.init_store()
    api.help()
    el = time.time()
    print("Took " + str(el - sl) + " to load all data")
    return api, reporting