Skip to content

Commit 54b7b12

Browse files
committed
convert.py: sort imports with isort
1 parent fde5b0a commit 54b7b12

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

convert-pth-to-ggml.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Compatibility stub
22

3-
import argparse, convert
3+
import argparse
4+
5+
import convert
46

57
parser = argparse.ArgumentParser(description='Convert a LLaMA model checkpoint to a ggml compatible file')
68
parser.add_argument('dir_model', help='directory containing the model checkpoint')

convert.py

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
from sentencepiece import SentencePieceProcessor # type: ignore
2-
import json, struct, re, zipfile, pickle, itertools, sys, enum, concurrent.futures
3-
import argparse, math, io, functools, mmap, signal, faulthandler, copy
1+
import argparse
2+
import concurrent.futures
3+
import copy
4+
import enum
5+
import faulthandler
6+
import functools
7+
import io
8+
import itertools
9+
import json
10+
import math
11+
import mmap
12+
import pickle
13+
import re
14+
import signal
15+
import struct
16+
import sys
17+
import zipfile
18+
from abc import ABCMeta, abstractmethod
19+
from dataclasses import dataclass
420
from pathlib import Path
21+
from typing import (IO, Any, Callable, Iterable, Literal, Optional, Sequence,
22+
TypeVar, Union)
23+
524
import numpy as np
6-
from dataclasses import dataclass
7-
from typing import Optional, Callable, Any, Iterable, IO, Sequence, Union, TypeVar, Literal
8-
from abc import abstractmethod, ABCMeta
25+
from sentencepiece import SentencePieceProcessor # type: ignore
926

1027
faulthandler.register(signal.SIGUSR1)
1128

0 commit comments

Comments
 (0)