TopologicalSemanticGraphMemory icon indicating copy to clipboard operation
TopologicalSemanticGraphMemory copied to clipboard

AttributeError: 'NoneType' object has no attribute 'action_space'

Open McGrady-175 opened this issue 10 months ago • 0 comments

my gym version is gym~=0.20.0,and I run the command:python train_il.py --policy TSGMPolicy --config configs/TSGM.yaml --version exp_name --data-dir IL_data/gibson --prebuild-path IL_data/gibson_graph

The error that occurs is as follows:

(tsgm) jiayuliang@jiayuliang-Legion-Y9000P-IRX9H:~/WS/TopologicalSemanticGraphMemory$ python train_il.py --policy TSGMPolicy --config configs/TSGM.yaml --version exp_name --data-dir IL_data/gibson --prebuild-path IL_data/gibson_graph /media/jiayuliang/Data/miniconda3/envs/tsgm/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.22.2.post1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations UserWarning,

Dataset Name: gibson POLICY : TSGMPolicy Image Graph Threshold: 0.75 Object Graph Threshold: 0.8

/media/jiayuliang/Data/miniconda3/envs/tsgm/lib/python3.7/site-packages/torch/cuda/init.py:80: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/conda/conda-bld/pytorch_1634272168290/work/c10/cuda/CUDAFunctions.cpp:112.) return torch._C._cuda_getDeviceCount() > 0 Traceback (most recent call last): File "train_il.py", line 269, in train() File "train_il.py", line 109, in train trainer = eval(config.TASK_CONFIG.IL_TRAINER)(config, policy) File "/home/jiayuliang/WS/TopologicalSemanticGraphMemory/trainer/il/il_trainer.py", line 15, in init self.env_wrapper = eval(cfg.IL.WRAPPER)(None) File "/home/jiayuliang/WS/TopologicalSemanticGraphMemory/trainer/il/il_wrapper.py", line 11, in init super().init(env) File "/media/jiayuliang/Data/miniconda3/envs/tsgm/lib/python3.7/site-packages/gym/core.py", line 227, in init self.action_space = self.env.action_space AttributeError: 'NoneType' object has no attribute 'action_space'

McGrady-175 avatar Apr 13 '25 14:04 McGrady-175