Skip to content

Why did I always get errors when running the logs demo? #21

Description

@binarywang

Processed prompts:   0%|                | 0/1 [00:00<?, ?it/s, est. speed input: 0.00 toks/s, output: 0.00 toks/s]WARNING 02-13 18:11:07 scheduler.py:895] Input prompt (4738 tokens) is too long and exceeds limit of 512
Processed prompts: 100%|█| 1/1 [00:00<00:00, 1998.24it/s, est. speed input: 11046477.13 toks/s, output: 0.00 toks/
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/main.py", line 1187, in parse_raw
[rank0]:     obj = parse.load_str_bytes(
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/deprecated/parse.py", line 49, in load_str_bytes
[rank0]:     return json_loads(b)  # type: ignore
[rank0]:   File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
[rank0]:     return _default_decoder.decode(s)
[rank0]:   File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
[rank0]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[rank0]:   File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
[rank0]:     raise JSONDecodeError("Expecting value", s, err.value) from None
[rank0]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[rank0]: During handling of the above exception, another exception occurred:

[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/ubuntu/dottxt-ai-logs/example.py", line 85, in <module>
[rank0]:     results = parser.analyze_logs(
[rank0]:   File "/home/ubuntu/dottxt-ai-logs/stressed.py", line 380, in analyze_logs
[rank0]:     analysis = self.logger(prompt, max_tokens=self.token_max)
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/outlines/generate/api.py", line 511, in __call__
[rank0]:     return format(completions)
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/outlines/generate/api.py", line 497, in format
[rank0]:     return self.format_sequence(sequences)
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/outlines/generate/json.py", line 50, in <lambda>
[rank0]:     generator.format_sequence = lambda x: schema_object.parse_raw(x)
[rank0]:   File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/main.py", line 1214, in parse_raw
[rank0]:     raise pydantic_core.ValidationError.from_exception_data(cls.__name__, [error])
[rank0]: pydantic_core._pydantic_core.ValidationError: 1 validation error for LogAnalysis
[rank0]: __root__
[rank0]:   Expecting value: line 1 column 1 (char 0) [type=value_error.jsondecode, input_value='', input_type=str]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions