Skip to content

Receiving 0 FPS in learner.py and the code problem in actor.py #11

@StevenUST

Description

@StevenUST

I also meet 0 FPS when I execute learner.py. Here is the output after executing learner.py

2024-01-21 12:31:43.273682: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
WARNING:tensorflow:From learner.py:23: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.

WARNING:tensorflow:From learner.py:23: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.

2024-01-21 12:31:43.914627: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2419195000 Hz
2024-01-21 12:31:43.916878: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5086140 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2024-01-21 12:31:43.916907: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2024-01-21 12:31:43.919762: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2024-01-21 12:31:44.329877: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:44.330010: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x50ec7f0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2024-01-21 12:31:44.330033: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA GeForce RTX 4060 Laptop GPU, Compute Capability 8.9
2024-01-21 12:31:44.330774: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:44.330801: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1666] Found device 0 with properties:
name: NVIDIA GeForce RTX 4060 Laptop GPU major: 8 minor: 9 memoryClockRate(GHz): 2.25
pciBusID: 0000:01:00.0
2024-01-21 12:31:44.330832: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2024-01-21 12:31:44.337407: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2024-01-21 12:31:44.357283: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2024-01-21 12:31:44.357703: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2024-01-21 12:31:44.358499: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.11
2024-01-21 12:31:44.359689: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2024-01-21 12:31:44.359824: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2024-01-21 12:31:44.360369: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:44.360835: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:44.360892: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1794] Adding visible gpu devices: 0
2024-01-21 12:31:44.360946: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2024-01-21 12:31:45.009591: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1206] Device interconnect StreamExecutor with strength 1 edge matrix:
2024-01-21 12:31:45.009647: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212] 0
2024-01-21 12:31:45.009669: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1225] 0: N
2024-01-21 12:31:45.010572: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:45.010604: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Could not identify NUMA node of platform GPU id 0, defaulting to 0. Your kernel may not have been built with NUMA support.
2024-01-21 12:31:45.011234: E tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1068] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node
Your kernel may have been built without NUMA support.
2024-01-21 12:31:45.011351: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1351] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5190 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 4060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.9)
model build success
Logging to LEARNER-2024-01-21-12-31-45/log

Besides, I read the code in actor.py carefully and I found if the actor sends data to learner, the type of state must be str. However, when I record the type of state, it is either dict or int.

This is the program segment where the actor sends data to learner based on the type of state.

while True:
# 做动作到获得reward
state = deserialize(socket.recv())
if not isinstance(state, int) and not isinstance(state, float) and not isinstance(state, str):
action_index = player.sample(state)
socket.send(serialize(action_index).to_buffer())
elif isinstance(state, str):
socket.send(b'none')
if state[0] == 'y':
player.save_data(int(state[1]))
else:
player.save_data(-int(state[1]))
player.send_data(state)
player.update_weight()
else:
socket.send(b'none')
player.save_data(state)

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