Skip to content

Getting ReadTimeoutError while trying the quickstart sample on the ReadMe #49

Description

@vishnuprksh

Getting ReadTimeoutError while trying the following code,

from ragrank import evaluate
from ragrank.dataset import from_dict
from ragrank.metric import response_relevancy

# Define your dataset
data = from_dict({
    "question": "What is the capital of France?",
    "context": ["France is famous for its iconic landmarks such as the Eiffel Tower and its rich culinary tradition."],
    "response": "The capital of France is Paris.",
})

# Evaluate the response relevance metric
result = evaluate(data, metrics=[response_relevancy])

# Display the evaluation results
result.to_dataframe()

output is like shown below

Evaluating : 100%|█████████████████████████████████████████████████| 1/1   remain: 00:00s,  1.42it/s
---------------------------------------------------------------------------
TimeoutError                              Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py](https://localhost:8080/#) in _make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
    535         try:
--> 536             response = conn.getresponse()
    537         except (BaseSSLError, OSError) as e:

26 frames
TimeoutError: The read operation timed out

The above exception was the direct cause of the following exception:

ReadTimeoutError                          Traceback (most recent call last)
ReadTimeoutError: HTTPSConnectionPool(host='ragrank-trace.onrender.com', port=443): Read timed out. (read timeout=10.0)

During handling of the above exception, another exception occurred:

ReadTimeout                               Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/requests/adapters.py](https://localhost:8080/#) in send(self, request, stream, timeout, verify, cert, proxies)
    711                 raise SSLError(e, request=request)
    712             elif isinstance(e, ReadTimeoutError):
--> 713                 raise ReadTimeout(e, request=request)
    714             elif isinstance(e, _InvalidHeader):
    715                 raise InvalidHeader(e, request=request)

ReadTimeout: HTTPSConnectionPool(host='ragrank-trace.onrender.com', port=443): Read timed out. (read timeout=10.0)

I used a google colab for running the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions