Skip to content

Add tiny llama

Add tiny llama #22

GitHub Actions / Test Results failed Jan 30, 2024 in 0s

1 fail, 35 skipped, 24 pass in 44m 0s

  6 files    6 suites   44m 0s ⏱️
 60 tests  24 ✅  35 💤 1 ❌
360 runs  148 ✅ 210 💤 2 ❌

Results for commit 059bf62.

Annotations

Check warning on line 0 in tests.unittests.test_prompt_generation

@github-actions github-actions / Test Results

2 out of 6 runs failed: test_cpu_tinyllama_lm_prompt_generator (tests.unittests.test_prompt_generation)

artifacts/Test Results [windows-latest] (Python 3.10)/pytest.xml [took 5m 26s]
artifacts/Test Results [windows-latest] (Python 3.11)/pytest.xml [took 5m 29s]
Raw output
AssertionError: assert (243 > 0 and False)
 +  where 243 = len('A photo of a bike riders hands on the handlebars, with the frame of the bike in the background\n\nThe scene: A group ... including a bike rider, pedal away from the camera in a bustling street. The frame of the bike is visible, with the r')
 +  and   False = any([False])
@pytest.mark.skipif(
        total_memory < 12 or total_disk_space < 12,
        reason="Test requires at least 12GB of RAM and 12GB of HDD for running on CPU",
    )
    def test_cpu_tinyllama_lm_prompt_generator():
>       _check_lm_prompt_generator("cpu", TinyLlamaLMPromptGenerator)

tests\unittests\test_prompt_generation.py:92: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

device = 'cpu'
prompt_generator_class = <class 'datadreamer.prompt_generation.tinyllama_lm_prompt_generator.TinyLlamaLMPromptGenerator'>

    def _check_lm_prompt_generator(device: str, prompt_generator_class=LMPromptGenerator):
        object_names = ["aeroplane", "bicycle", "bird", "boat"]
        prompt_generator = prompt_generator_class(
            class_names=object_names, prompts_number=2, device=device
        )
        prompts = prompt_generator.generate_prompts()
        # Check that the some prompts were generated
        assert len(prompts) > 0
        # Iterate through the prompts
        for selected_objects, prompt_text in prompts:
            # Selected objects aren't empty
            assert len(selected_objects) > 0
            # The slected objects are in the range
            assert (
                prompt_generator.num_objects_range[0]
                <= len(selected_objects)
                <= prompt_generator.num_objects_range[1]
            )
            # Check the generated text
>           assert len(prompt_text) > 0 and any(
                [x in prompt_text for x in selected_objects]
            )
E           AssertionError: assert (243 > 0 and False)
E            +  where 243 = len('A photo of a bike riders hands on the handlebars, with the frame of the bike in the background\n\nThe scene: A group ... including a bike rider, pedal away from the camera in a bustling street. The frame of the bike is visible, with the r')
E            +  and   False = any([False])

tests\unittests\test_prompt_generation.py:57: AssertionError