()
return tempdir
Download and extract finetuned model from S3
Download and extract finetuned model from S3
Download and extract finetuned model from S3
def download_pretrained_model():
    """ Download and extract finetuned model from S3 """
    resolved_archive_file = cached_path(HF_FINETUNED_MODEL)
    tempdir = tempfile.mkdtemp()
    logger.info("extracting archive file {} to temp dir {}".format(resolved_archive_file, tempdir))
    with tarfile.open(resolved_archive_file, 'r:gz') as archive:
        archive.extractall(tempdir)
    return tempdir
def download_pretrained_model ( ) : resolved_archive_file = cached_path ( HF_FINETUNED_MODEL ) tempdir = tempfile . mkdtemp ( ) logger . info ( "extracting archive file {} to temp dir {}" . format ( resolved_archive_file , tempdir ) ) with tarfile . open ( resolved_archive_file , 'r:gz' ) as archive : archive . extractall ( tempdir ) return tempdir