Пример #1
0
def initialize():
    base_path = os.path.dirname(__file__)
    add_to_path(os.path.abspath(os.path.join(base_path, '..', '..', 'shared')))
    add_to_path(os.path.abspath(os.path.join(base_path, 'lib')))
    add_to_path(
        os.path.abspath(
            os.path.join(base_path, '..', 'modeling_trained_model_generator',
                         'lib')))
    add_to_path(
        os.path.abspath(
            os.path.join(base_path, '..', 'classification_classifier', 'lib')))

    global log_file_path
    log_file_path = os.path.join(
        base_path, 'out', 'labeling_{}.log'.format(
            datetime.datetime.now().strftime("%Y-%m-%dT%H%M%S")))

    import config
    import sharedlib
    sharedlib.initialize(base_path, log_file_path, config.remote_server)

    sharedlib.create_dirs([
        sharedlib.abspath(os.path.join(base_path, 'in')),
        sharedlib.abspath(os.path.join(base_path, 'out')),
        sharedlib.abspath(
            os.path.join(base_path, '..', 'modeling_trained_model_generator',
                         'out'))
    ])
Пример #2
0
def initialize():
    base_path = os.path.dirname(__file__)
    add_to_path(os.path.abspath(os.path.join(base_path, '..', '..', 'shared')))
    add_to_path(os.path.abspath(os.path.join(base_path, 'lib')))

    global log_file_path
    log_file_path = os.path.join(base_path, 'out', 'pre_labeling_{}.log'.format(datetime.datetime.now().strftime("%Y-%m-%dT%H%M%S")))

    import config
    import sharedlib
    sharedlib.initialize(base_path, log_file_path, config.remote_server)

    sharedlib.create_dirs([sharedlib.abspath(os.path.join(base_path, 'out')),
                           sharedlib.abspath(os.path.join(base_path, 'file_chunks'))])
Пример #3
0
def initialize():
    base_path = os.path.dirname(__file__)
    add_to_path(os.path.abspath(os.path.join(base_path, '..', '..', 'shared')))
    add_to_path(os.path.abspath(os.path.join(base_path, 'lib')))

    global log_file_path
    log_file_path = os.path.join(base_path, 'out', 'why_session.log')

    import config
    import sharedlib
    sharedlib.initialize(base_path, log_file_path, config.remote_server)

    sharedlib.create_dirs([
        sharedlib.abspath(os.path.join(base_path, 'out')),
        sharedlib.abspath(os.path.join(base_path, 'file_chunks'))
    ])