yuqingd / ellm

60 stars 8 forks source link

Could not find dataset CosRearrangementDataset-v0 #1

Open HDG94 opened 11 months ago

HDG94 commented 11 months ago

Hi, I'm hoping to run the code for the house keeping environment with the command in the readme: python train.py single_goal_eval=True use_language_state=sbert env_spec.use_sbert=True use_goal=True env_spec.lm_spec.lm_class=SimpleOracle train_after_reward=True decay_after_reward=True finetune_snapshot=True agent.train_eps_max=.5 lr=0.00002 env_spec.single_task="finetuning task name" snapshot_path=/path/to/pretrained/agent num_train_frames=1000000 exp_name=TEST_RUN.

I'm getting this error AssertionError: Could not find dataset CosRearrangementDataset-v0. Could you please help with this issue?

(Comparing the text_housekeep with the housekeep repo, it looks like inside cos_eor/ there is a dataset/ folder but not inside the text_housekeep. So I pasted the dataset folder there. Is this causing the error and is there some code I'm missing?

Thank you very much for your time and help!

dongfeicui commented 2 weeks ago

The root cause is that the CosRearrangementDatasetV0 registry and the registry of other data classes are not recognized as the same class, even though they are actually the same class. This discrepancy might be due to different import paths for the class, which could result in different class prefixes and thus lead to the classes not being recognized as identical. image

To address this issue:

  1. Annotation: Register classes using decorators.
  2. Modify the function according to the image below. image
  3. Add a line of code as shown in the image below. image