tensorflow.map hangs randomly when using for num_parallel_calls a value > 1
Verify that Docker is properly configured, including memory and resource allocation settings, to ensure optimal performance.Also you can try updating the python version and dataset_train = tf.data.Dataset.from_tensor_slices((filenames)) line has double round bracket instead of single.Hope this helps @GrannyTickler,
I tried to execute the mentioned code and it was failing due to a different error. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/24d1fb3e0cc1eac262c9e5d060930a2b/untitled.ipynb) and provide the complete dependencies. Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. I tested the code without the docker container and it seems to work -> the issue can be closed apologies. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60747">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60747">No</a>

### System information

-   **Have I written custom code (as opposed to using a stock example script
    provided in TensorFlow)**: yes
-   **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: wsl2 on windows
-   **TensorFlow installed from (source or binary)**: binary
-   **TensorFlow version (use command below)**: 2.12.0
-   **Python version**: 3.8.10
-   **CUDA/cuDNN version**: 12.0
-   **GPU model and memory**: RTX A5000 24GB


### Describe the problem

I am using tensorflow in a docker container on wsl2 for training neural networks but unfortunately everything freezes during the image import if done with the tf.map function with the parameter "num_parallel_calls" set to a value >1. Below is a minimal example of the code which causes the console to freeze at a random step and the CPU-usage to drop to a minimal level while the RAM is still occupied. After everything is frozen, the docker container is unresponsive and has to be restarted by stopping the process. This might even take half a day -> a few hundred thousand iterations but it allways happens at some point.


### Source code / logs

`import tensorflow as tf

def parse_function(filename):
    return tf.io.read_file(filename)

filenames = []
for i in range (100000):
    filenames.append("/D/test.png")

dataset_train = tf.data.Dataset.from_tensor_slices((filenames))
dataset_train = dataset_train.map(parse_function, num_parallel_calls =  2)
dataset_train = dataset_train.batch(50)

for epoch in range(1000):
    for step, (x_batch_train) in enumerate(dataset_train):
        print("epoch:", epoch, "start train step:",step)`


This issue is similar to others like #32454 but i still can't find a fix. 
Bypassing the map-function by loading everything at once works -> definitly during mapping if parallel calls are allowed
