Farama-Foundation / D4RL

A collection of reference environments for offline reinforcement learning
Apache License 2.0
1.34k stars 286 forks source link

Wrong URLs for downloading dataset #8

Closed frt03 closed 4 years ago

frt03 commented 4 years ago

I got HTTPError: HTTP Error 404: Not Found when I tried to download some dataset.

In [56]: env = gym.make(‘halfcheetah-random-expert-v0’)                                                                                            
In [57]: dataset = env.get_dataset()                                                                                                      
Downloading dataset: http://rail.eecs.berkeley.edu/datasets/offline_rl/gym_mujoco/halfcheetah_random_expert.hdf5 to /root/d4rl_dataset/halfcheetah_random_expert.hdf5
---------------------------------------------------------------------------
HTTPError                 Traceback (most recent call last)
<ipython-input-57-3347b5d22c17> in <module>
----> 1 dataset = env.get_dataset()

~/matsushima/furuta/d4rl/d4rl/offline_env.py in get_dataset(self, h5path)
   53       if not os.path.exists(self.dataset_filepath):
   54         print(‘Downloading dataset:’, self._dataset_url, ‘to’, self.dataset_filepath)
---> 55         urllib.request.urlretrieve(self._dataset_url, self.dataset_filepath)
   56 
   57       if not os.path.exists(self.dataset_filepath):

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in urlretrieve(url, filename, reporthook, data)
  245   url_type, path = splittype(url)
  246 
--> 247   with contextlib.closing(urlopen(url, data)) as fp:
  248     headers = fp.info()
  249 

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
  220   else:
  221     opener = _opener
--> 222   return opener.open(url, data, timeout)
  223 
  224 def install_opener(opener):

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)
  529     for processor in self.process_response.get(protocol, []):
  530       meth = getattr(processor, meth_name)
--> 531       response = meth(req, response)
  532 
  533     return response

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in http_response(self, request, response)
  639     if not (200 <= code < 300):
  640       response = self.parent.error(
--> 641         ‘http’, request, response, code, msg, hdrs)
  642 
  643     return response

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in error(self, proto, *args)
  567     if http_err:
  568       args = (dict, ‘default’, ‘http_error_default’) + orig_args
--> 569       return self._call_chain(*args)
  570 
  571 # XXX probably also want an abstract factory that knows when it makes

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
  501     for handler in handlers:
  502       func = getattr(handler, meth_name)
--> 503       result = func(*args)
  504       if result is not None:
  505         return result

~/.pyenv/versions/3.7.4/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
  647 class HTTPDefaultErrorHandler(BaseHandler):
  648   def http_error_default(self, req, fp, code, msg, hdrs):
--> 649     raise HTTPError(req.full_url, code, msg, hdrs, fp)
  650 
  651 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 404: Not Found

The same error has occurred in walker2d-random-expert-v0, door-only-cloned-v0, hammer-only-cloned-v0, pen-only-cloned-v0, relocate-only-cloned-v0. I think maybe you don't make some of them available for now. If possible, could you check it?

justinjfu commented 4 years ago

Thanks for catching this! These were older tasks that we removed prior to release. We may add these again in the future but for now the only supported tasks are those listed on the wiki page.