e-p-armstrong / augmentoolkit

Convert Compute And Books Into Instruct-Tuning Datasets! Makes: QA, RP, Classifiers.
MIT License
922 stars 123 forks source link

exception=TypeError("'<' not supported between instances of 'int' and 'str'")> #20

Closed ketsapiwiq closed 3 months ago

ketsapiwiq commented 4 months ago

Hi! I have trouble debugging this. It's probably something sent back by the API with a <? Thanks in advance.

./output/qatuples_revised/revised_20.json
Loaded file:
[
    "How?",
    "How.",
    "./raw_txt_input/01_02"
]
-------------- QUESTIONS REVISED ------------- STATS SO FAR:
Nones: 0
Non-nones: 44
Total: 44
---------------- ONTO EXAMPLES GENERATION-------------------
  0%|          | 0/11 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/hadrien/git/augmentoolkit/processing.py", line 443, in <module>
    asyncio.run(main())
  File "/home/hadrien/.pyenv/versions/3.11.9/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/hadrien/.pyenv/versions/3.11.9/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hadrien/.pyenv/versions/3.11.9/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/hadrien/git/augmentoolkit/processing.py", line 364, in main
    await future
  File "/home/hadrien/.pyenv/versions/3.11.9/lib/python3.11/asyncio/tasks.py", line 615, in _wait_for_one
    return f.result()  # May raise f.exception().
           ^^^^^^^^^^
  File "/home/hadrien/git/augmentoolkit/processing.py", line 107, in run_task_with_limit
    return await task
           ^^^^^^^^^^
  File "/home/hadrien/git/augmentoolkit/augmentoolkit/control_flow_functions/control_flow_functions.py", line 1859, in create_info
    sample_size = min(rearrangements_to_take, len(all_permutations))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'int' and 'str'
2024-05-26 12:17:10,111 - ERROR - Task exception was never retrieved
future: <Task finished name='Task-72' coro=<main.<locals>.run_task_with_limit() done, defined at /home/hadrien/git/augmentoolkit/processing.py:104> exception=TypeError("'<' not supported between instances of 'int' and 'str'")>
Traceback (most recent call last):
  File "/home/hadrien/git/augmentoolkit/processing.py", line 107, in run_task_with_limit
    return await task
           ^^^^^^^^^^
  File "/home/hadrien/git/augmentoolkit/augmentoolkit/control_flow_functions/control_flow_functions.py", line 1859, in create_info
    sample_size = min(rearrangements_to_take, len(all_permutations))
e-p-armstrong commented 4 months ago

hmm, that's strange. Are you able to share your config and input texts?

ketsapiwiq commented 4 months ago

Important point, I was trying out a weird openAI endpoint (Mistral), so maybe this is the cause. I'll retry next week and will try to dig deeper.

e-p-armstrong commented 3 months ago

PR has been merged that allegedly fixes this

AllyourBaseBelongToUs commented 2 months ago

Im sorry for reviving an old issue.

This error is an error when typing new values in the gradio UI

its being written into the config file with ''

example:

you type 30 in max concurrency, in the config file it appears as '30' which causes this error