surgical-robotics-ai / SurgicAI

MIT License
8 stars 2 forks source link

'SRC_approach' object has no attribute 'needle_multigoal_evaluator' #2

Open choucaicai opened 2 weeks ago

choucaicai commented 2 weeks ago

Traceback (most recent call last): File "/home/jck/SurgicAI/RL/train.py", line 73, in model.learn(total_timesteps=int(300000), progress_bar=True,callback=checkpoint_callback,reset_num_timesteps=False) File "/home/jck/SurgicAI/RL/RL_algo/td3_BC.py", line 236, in learn return super().learn( File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/stable_baselines3/common/off_policy_algorithm.py", line 314, in learn total_timesteps, callback = self._setup_learn( File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/stable_baselines3/common/off_policy_algorithm.py", line 297, in _setup_learn return super()._setup_learn( File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/stable_baselines3/common/base_class.py", line 423, in _setup_learn self._last_obs = self.env.reset() # type: ignore[assignment] File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/stable_baselines3/common/vec_env/dummy_vec_env.py", line 77, in reset obs, self.reset_infos[env_idx] = self.envs[env_idx].reset(seed=self._seeds[env_idx], maybe_options) File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/stable_baselines3/common/monitor.py", line 83, in reset return self.env.reset(kwargs) File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/gymnasium/wrappers/order_enforcing.py", line 61, in reset return self.env.reset(kwargs) File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/gymnasium/wrappers/env_checker.py", line 57, in reset return env_reset_passive_checker(self.env, kwargs) File "/home/jck/anaconda3/envs/py39-ambf/lib/python3.9/site-packages/gymnasium/utils/passive_env_checker.py", line 186, in env_reset_passive_checker result = env.reset(**kwargs) File "/home/jck/SurgicAI/RL/Approach_env.py", line 42, in reset self.multigoal_obs = self.needle_multigoal_evaluator(lift_height=0.007,start_degree=self.min_angle,end_degree=self.max_angle) AttributeError: 'SRC_approach' object has no attribute 'needle_multigoal_evaluator'

JinnWu686 commented 3 days ago

Apologies for the missing functions. We've just updated the repository and added the missing modules, so it should work as expected now.