-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isaac datatype fixes and convert task observation (#138)
* fixed J, R calculation from dataset * fixed reset_all datatype and dimension check * convert observation from Task-type (dict) to Tensor * proper naming of isaac_util function * convert task_obs also in reset * added default episode length
- Loading branch information
Showing
3 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import torch | ||
|
||
|
||
def convert_task_observation(observation): | ||
obs_t = observation | ||
for _ in range(5): | ||
if torch.is_tensor(obs_t): | ||
break | ||
obs_t = obs_t[list(obs_t.keys())[0]] | ||
return obs_t |