Repository: confident-ai/deepeval
Issue: Deepeval does not work on AWS Lambda
Root cause: Architectural Constraint

**Describe the bug**
Deepeval package creates temporary files when running the evaluations, the files end up being stored wherever the code is deployed however the only file directory which AWS Lambda allows to write files to is "/tmp". This leads to the following error to occur:
```
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see
https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
[ERROR] OSError: [Errno 30] Read-only file system: 'temp_test_run_data.json'
Traceback (most recent call last):
  File "/var/task/src/core/main.py", line 63, in lambda_handler
    output = de_utils.evaluate_dataset(dataset, defined_metrics)
  File "/var/task/src/Deepeval/de_utils.py", line 42, in evaluate_dataset
    results = evaluate(dataset, metrics)
  File "/var/task/deepeval/evaluate.py", line 592, in evaluate
    test_results = loop.run_until_complete(
  File "/var/lang/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
  File "/var/task/deepeval/evaluate.py", line 372, in a_execute_test_cases
    test_run = test_run_manager.get_test_run()
  File "/var/task/deepeval/test_run/test_run.py", line 304, in get_test_run
    self.create_test_run()
  File "/var/task/deepeval/test_run/test_run.py", line 300, in create_test_run
    self.save_test_run()
  File "/var/task/deepeval/test_run/test_run.py", line 326, in save_test_run
    with portalocker.Lock(self.temp_file_name, mode="w") as file:
  File "/var/task/portalocker/utils.py", line 302, in __enter__
    return self.acquire()
  File "/var/task/portalocker/utils.py", line 256, in acquire
    fh = self._get_fh()
  File "/var/task/portalocker/utils.py", line 313, in _get_fh
    return open(  # noqa: SIM115
```

**To Reproduce**
Steps to reproduce the behavior:
Deploy a simple python lambda and run deepeval on it

**Expected behavior**
Should run without errors


Are you running the evaluate function? @atrik-das-razer 

Yep that's right @penguine-ip 

Were you able to find a fix for this? I've tried forcing DeepEval to store at "/tmp/" but no joys

Disabling write cache and telemetry fixed it for me.
To disable write cache, when calling `evaluate`, add a cache config:
```python
evaluate(test_cases=..., metrics=..., cache_config=CacheConfig(use_cache=False, write_cache=False))
```

To disable telemetry, set `DEEPEVAL_TELEMETRY_OPT_OUT` env var to exact value of `YES`.

Any advice when using observe() for tracing? 

Just disabling telementary is not enough, but looking through the code I do not think cacheconfig is something the observe handler takes in