Skip to content

Commit d4b9d39

Browse files
committed
Lint
1 parent aca21eb commit d4b9d39

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/models/checkpoint.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pathlib import Path
1010
from typing import Any, Dict, Optional
1111

12+
1213
def get_default_model_resource_dir() -> str:
1314
"""
1415
Get the default path to resouce files (which contain files such as the
@@ -18,10 +19,11 @@ def get_default_model_resource_dir() -> str:
1819
"""
1920

2021
try:
22+
import pkg_resources
23+
2124
# 2nd way: If we can import this path, we are running with buck2 and all resources can be accessed with pkg_resources.
2225
# pyre-ignore
23-
import pgk_resources
24-
from executorch.examples.models.llama2 import params
26+
from executorch.examples.models.llama2 import params # noqa
2527

2628
ckpt_dir = Path(
2729
pkg_resources.resource_filename(
@@ -32,7 +34,8 @@ def get_default_model_resource_dir() -> str:
3234
# 3rd way.
3335
ckpt_dir = Path(__file__).absolute().parent / "params"
3436

35-
return ckpt_dir
37+
return ckpt_dir
38+
3639

3740
def get_checkpoint_dtype(checkpoint: Dict[str, Any]) -> Optional[str]:
3841
dtype = None

examples/models/llama2/model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,3 @@ def _transform_for_pre_quantization(self, checkpoint):
313313
int(embedding_bit_width),
314314
embedding_group_size,
315315
)
316-

0 commit comments

Comments
 (0)