def run_from_command_line():
    logging.basicConfig(level=logging.INFO, format='%(message)s')

    try:
        relation_name = iepy.instance.rules.RELATION
    except AttributeError:
        logging.error("RELATION not defined in rules file")
        sys.exit(1)

    try:
        relation = models.Relation.objects.get(name=relation_name)
    except __HOLE__:
        logging.error("Relation {!r} not found".format(relation_name))
        sys.exit(1)

    # Load rules
    rules = load_rules()

    # Load evidences
    evidences = CandidateEvidenceManager.candidates_for_relation(relation)

    # Run the pipeline
    iextractor = RuleBasedCore(relation, rules)
    iextractor.start()
    iextractor.process()
    predictions = iextractor.predict(evidences)
    output.dump_output_loop(predictions)
dataset/ETHPy150Open machinalis/iepy/iepy/instantiation/iepy_rules_runner.py/run_from_command_line