Skip to content

Commit

Permalink
Hopefully CI runs now
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Feb 14, 2025
1 parent 15f9b8b commit c05e015
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
task:
- name: Test
run: |
pytest -v --color=yes tests/
pytest -v --color=yes -m "not nonci" tests/
include:
- python: "3.11"
task:
name: Lint
run: ruff check .

# Removing mypy for now, as it isn't handling async things correctly
# Removing mypy for now, as it isn't handling async things correctly and crashing
# - python: "3.11"
# task:
# name: Type check
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ python_classes = [
]
log_format = "%(asctime)s - %(levelname)s - %(name)s - %(message)s"
log_level = "DEBUG"
markers = [
"nonci: mark test as not intended for CI runs"
]
59 changes: 0 additions & 59 deletions tests/test_coherency.py

This file was deleted.

2 changes: 2 additions & 0 deletions tests/test_dataloader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
from functools import partial

import pytest
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AutoProcessor
Expand All @@ -14,6 +15,7 @@
from olmocr.train.dataprep import batch_prepare_data_for_qwen2_training


@pytest.mark.nonci
class TestBatchQueryResponseDataset(unittest.TestCase):
def testLoadS3(self):
ds = load_jsonl_into_ds("s3://ai2-oe-data/jakep/openai_batch_data_v2/*.jsonl", first_n_files=3)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from unittest.mock import patch

import numpy as np
import pytest
import requests
import torch
from PIL import Image
Expand All @@ -27,6 +28,7 @@
from olmocr.train.utils import make_dataset


@pytest.mark.nonci
class TestDataprep(unittest.TestCase):
def testFullDataloader(self):
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct")
Expand Down
2 changes: 2 additions & 0 deletions tests/test_molmo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest

import pytest
import requests
from PIL import Image
from transformers import (
Expand All @@ -10,6 +11,7 @@
)


@pytest.mark.nonci
class MolmoProcessorTest(unittest.TestCase):
def test_molmo_demo(self):
# load the processor
Expand Down
6 changes: 4 additions & 2 deletions tests/test_sglang.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import json
import math
import os
import tempfile
import unittest
from io import BytesIO
from pathlib import Path
from unittest.mock import AsyncMock, patch

import numpy as np
import pytest
import torch
import torch.nn.functional as F
from httpx import AsyncClient
Expand All @@ -36,7 +36,7 @@
)


@unittest.skip("Skip these tests when running CI, they are mostly for experimentation")
@pytest.mark.nonci
class TestSglangServer(unittest.IsolatedAsyncioTestCase):
async def asyncSetUp(self):
# Mock arguments
Expand Down Expand Up @@ -110,6 +110,7 @@ async def asyncTearDown(self):
# os.rmdir(self.args.workspace)


@pytest.mark.nonci
class TestHuggingFaceModel(unittest.IsolatedAsyncioTestCase):
async def asyncSetUp(self):
# Set up the Hugging Face model and tokenizer
Expand Down Expand Up @@ -248,6 +249,7 @@ async def asyncTearDown(self):
torch.cuda.empty_cache()


@pytest.mark.nonci
class RawSGLangTest(unittest.IsolatedAsyncioTestCase):
def setUp(self):
# Set up the Hugging Face model and tokenizer
Expand Down

0 comments on commit c05e015

Please sign in to comment.