Skip to content

Commit

Permalink
fixed import order
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni committed Nov 6, 2023
1 parent 0ef43a5 commit 8a6ba4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/dolma/cli/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class TaggerConfig:
help="If true, only print the configuration and exit without running the taggers.",
)


class TaggerCli(BaseCli):
CONFIG = TaggerConfig
DESCRIPTION = (
Expand Down
2 changes: 1 addition & 1 deletion python/dolma/core/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from .parallel import BaseParallelProcessor, QueueType
from .paths import delete_dir, join_path, make_relative, mkdir_p, split_glob, split_path
from .registry import TaggerRegistry
from .utils import make_variable_name, import_modules
from .utils import import_modules, make_variable_name

# this placeholder gets used when a user has provided no experiment name, and we want to use taggers'
# names as experiment names.
Expand Down
3 changes: 2 additions & 1 deletion python/dolma/core/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import string
from typing import List
from importlib import import_module
from typing import List

try:
import blingfire
Expand Down Expand Up @@ -68,6 +68,7 @@ def split_sentences(text: str, remove_empty: bool = True) -> List[TextSlice]:
else:
raise NotImplementedError("remove_empty=False is not implemented yet")


def import_modules(modules: List[str]):
for module in modules:
try:
Expand Down

0 comments on commit 8a6ba4e

Please sign in to comment.