Skip to content

Commit

Permalink
running isort again
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Jan 30, 2025
1 parent 2c29533 commit c37e545
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
1 change: 0 additions & 1 deletion olmocr/data/convertsilver_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from cached_path import cached_path



def setup_logging():
"""Configure logging for the script."""
logging.basicConfig(level=logging.INFO, format="[%(asctime)s] %(levelname)s: %(message)s", handlers=[logging.StreamHandler(sys.stdout)])
Expand Down
2 changes: 1 addition & 1 deletion olmocr/eval/runeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, as_completed
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, Optional, List
from typing import Dict, List, Optional

import boto3
import zstandard
Expand Down
8 changes: 7 additions & 1 deletion olmocr/prompts/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from .prompts import build_openai_silver_data_prompt, PageResponse, openai_response_format_schema, build_finetuning_prompt, extract_raw_text
from .prompts import (
PageResponse,
build_finetuning_prompt,
build_openai_silver_data_prompt,
extract_raw_text,
openai_response_format_schema,
)
1 change: 0 additions & 1 deletion olmocr/train/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from olmocr.prompts.anchor import get_anchor_text
from olmocr.s3_utils import parse_custom_id, parse_s3_path


# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
Expand Down
12 changes: 6 additions & 6 deletions olmocr/train/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
from datasets import Dataset, DatasetDict, concatenate_datasets
from transformers import AutoProcessor

from .core.cli import to_native_types
from .core.config import AwsConfig, DataConfig, SourceConfig, TrainConfig, WandbConfig
from .core.loggers import get_logger
from .core.paths import copy_dir, is_local
from .core.state import BeakerState

from olmocr.train.dataloader import build_finetuning_dataset
from olmocr.train.dataprep import (
batch_prepare_data_for_molmo_training,
batch_prepare_data_for_qwen2_training,
)

from .core.cli import to_native_types
from .core.config import AwsConfig, DataConfig, SourceConfig, TrainConfig, WandbConfig
from .core.loggers import get_logger
from .core.paths import copy_dir, is_local
from .core.state import BeakerState

T = TypeVar("T")

def accelerator_to_dtype(accelerator: Accelerator) -> torch.dtype:
Expand Down

0 comments on commit c37e545

Please sign in to comment.