iusztinpaul / hands-on-llms

🦖 𝗟𝗲𝗮𝗿𝗻 about 𝗟𝗟𝗠𝘀, 𝗟𝗟𝗠𝗢𝗽𝘀, and 𝘃𝗲𝗰𝘁𝗼𝗿 𝗗𝗕𝘀 for free by designing, training, and deploying a real-time financial advisor LLM system ~ 𝘴𝘰𝘶𝘳𝘤𝘦 𝘤𝘰𝘥𝘦 + 𝘷𝘪𝘥𝘦𝘰 & 𝘳𝘦𝘢𝘥𝘪𝘯𝘨 𝘮𝘢𝘵𝘦𝘳𝘪𝘢𝘭𝘴
MIT License
2.68k stars 427 forks source link

Exception: none is not an allowed value (type=type_error.none.not_allowed) #72

Open LegllersZ opened 3 months ago

LegllersZ commented 3 months ago

When I executed "make run_real_time" in folder "hands-on-llms/modules/streaming_pipeline", following instruction, an exception came up.

RUST_BACKTRACE=full poetry run python -m bytewax.run tools.run_real_time:build_flow
2024-03-12 10:14:28,492 - INFO - Initializing env vars...
2024-03-12 10:14:28,492 - INFO - Loading environment variables from: .env
2024-03-12 10:14:31,429 - INFO - HTTP Request: GET https://e4bf1959-f74c-490c-9f46-00897295ec9e.us-east4-0.gcp.cloud.qdrant.io:6333/collections/alpaca_financial_news "HTTP/2 200 OK"
Traceback (most recent call last):
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 88, in send
    return parse_as_type(response.json(), type_)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 201, in parse_as_type
    return model_type(obj=obj).obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[InlineResponse2005] (for parse_as_type)
obj -> result -> config -> optimizer_config -> max_optimization_threads
  none is not an allowed value (type=type_error.none.not_allowed)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/bytewax/run.py", line 430, in <module>
    kwargs["flow"] = _locate_dataflow(module_str, attrs_str)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/bytewax/run.py", line 204, in _locate_dataflow
    dataflow = attr(*args, **kwargs)
  File "/media/pactera/shared/Ubuntu/handsonllms/hands-on-llms/modules/streaming_pipeline/tools/run_real_time.py", line 26, in build_flow
    flow = flow_builder(model_cache_dir=model_cache_dir, debug=debug)
  File "/media/pactera/shared/Ubuntu/handsonllms/hands-on-llms/modules/streaming_pipeline/streaming_pipeline/flow.py", line 57, in build
    flow.output("output", _build_output(model, in_memory=debug))
  File "/media/pactera/shared/Ubuntu/handsonllms/hands-on-llms/modules/streaming_pipeline/streaming_pipeline/flow.py", line 90, in _build_output
    return QdrantVectorOutput(
  File "/media/pactera/shared/Ubuntu/handsonllms/hands-on-llms/modules/streaming_pipeline/streaming_pipeline/qdrant.py", line 42, in __init__
    self.client.get_collection(collection_name=self._collection_name)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/qdrant_client.py", line 844, in get_collection
    return self._client.get_collection(collection_name=collection_name, **kwargs)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/qdrant_remote.py", line 1566, in get_collection
    result: Optional[types.CollectionInfo] = self.http.collections_api.get_collection(
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api/collections_api.py", line 838, in get_collection
    return self._build_for_get_collection(
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api/collections_api.py", line 336, in _build_for_get_collection
    return self.api_client.request(
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 68, in request
    return self.send(request, type_)
  File "/media/pactera/shared/Ubuntu/python_poetry/cache/virtualenvs/streaming-pipeline-q1Qy2sa1-py3.10/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 90, in send
    raise ResponseHandlingException(e)
qdrant_client.http.exceptions.ResponseHandlingException: 1 validation error for ParsingModel[InlineResponse2005] (for parse_as_type)
obj -> result -> config -> optimizer_config -> max_optimization_threads
  none is not an allowed value (type=type_error.none.not_allowed)
make: *** [Makefile:31: run_real_time] Error 1

Why was this happening and what should I do? Thank you.