Exemple #1
0
def export_neuropod(model_path,
                    output_path='neuropod',
                    model_name='neuropod',
                    **kwargs):
    """Exports a model to Neuropod

    # Inputs

    :param model_path: (str) filepath to pre-trained model.
    :param output_path: (str, default: `'neuropod'`)  directory to store the
        neuropod model.
    :param model_name: (str, default: `'neuropod'`) save neuropod under this
        name.

    # Return

    :returns: (`None`)
    """
    logger.info('Model path: {}'.format(model_path))
    logger.info('Output path: {}'.format(output_path))
    logger.info('\n')

    utils_export_neuropod(model_path, output_path, model_name)

    logger.info('Saved to: {0}'.format(output_path))
Exemple #2
0
def export_neuropod(model_path,
                    output_path="neuropod",
                    model_name="neuropod",
                    **kwargs):
    """Exports a model to Neuropod.

    # Inputs

    :param model_path: (str) filepath to pre-trained model.
    :param output_path: (str, default: `'neuropod'`)  directory to store the
        neuropod model.
    :param model_name: (str, default: `'neuropod'`) save neuropod under this
        name.

    # Return

    :returns: (`None`)
    """
    logger.info(f"Model path: {model_path}")
    logger.info(f"Output path: {output_path}")
    logger.info("\n")

    model = LudwigModel.load(model_path)
    os.makedirs(output_path, exist_ok=True)
    utils_export_neuropod(model, output_path, model_name)

    logger.info(f"Saved to: {output_path}")
Exemple #3
0
def export_neuropod(
        model_path,
        output_path='neuropod',
        model_name='neuropod',
        **kwargs
):
    """Exports a model to Neuropod

    :param model_path: Is the model from which the tensors will be collected
    :param output_path: Output directory
    :param debug: To step through the stack traces and find possible errors
    :returns: None

    """
    logger.info('Model path: {}'.format(model_path))
    logger.info('Output path: {}'.format(output_path))
    logger.info('\n')

    utils_export_neuropod(model_path, output_path, model_name)

    logger.info('Saved to: {0}'.format(output_path))