You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug Report] Cannot modify network architecture with hydra if agent config is a configclass #2456
However, if the agent's configuration is using the configclass (as in the rsl_rl), and the number of layers within the default config does not match the provided Hydra arguments, I encounter an error, specifically, I get the following exception:
File "/workspace/isaaclab/source/isaaclab/isaaclab/utils/dict-py", line 103,
in update_class_from_dict
raise ValueError(
ValueError: [Configl: Incorrect length under namespace: /policy/actor_hidden_dims. Expected: 5,
Received: 4.
Is there any workaround for this?
Thanks in advance!
System Info
Isaac Sim Version: 4.5
OS: Ubuntu 22.04
GPU: 4090 RTX
CUDA: 12.2
GPU Driver: 535.129.03
Checklist
I have checked that there is no similar issue in the repo (required)
I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
To be able to use Hydra to modify network structure
Thanks for posting this. It's likely we have seen this before. Could you post a fuller error log? The team will review this. Thanks.
Thanks for your reply. A screenshot with the full error log is attached:
My understanding is that while updating the default config with Hydra arguments, the update_class_from_dict() function is called. This function considers that if the lengths of the Iterables do not match between the default config and Hydra arguments, this is an error, raising an exception. In other words, it is a deliberate design choice to raise this flag rather than a bug. However, this design choice results in the aforementioned limitation.
As a quick workaround, I tried to add the following exception for flat lists:
# If flat list, replace wholesale
if all(not isinstance(el, dict) for el in value):
out_val = tuple(value) if isinstance(obj_mem, tuple) else value
if isinstance(obj, dict):
obj[key] = out_val
else:
setattr(obj, key, out_val)
continue
right before this length check that cause the limitation:
This seems to solve the issue/limitation. However, I am not sure if this would break something else, somewhere else. If you could provide feedback on this for a robust solution, I could create a PR accordingly.
Activity
RandomOakForest commentedon May 10, 2025
Thanks for posting this. It's likely we have seen this before. Could you post a fuller error log? The team will review this. Thanks.
ozhanozen commentedon May 10, 2025
Thanks for your reply. A screenshot with the full error log is attached:
My understanding is that while updating the default config with Hydra arguments, the
update_class_from_dict()function is called. This function considers that if the lengths of the Iterables do not match between the default config and Hydra arguments, this is an error, raising an exception. In other words, it is a deliberate design choice to raise this flag rather than a bug. However, this design choice results in the aforementioned limitation.As a quick workaround, I tried to add the following exception for flat lists:
right before this length check that cause the limitation:
IsaacLab/source/isaaclab/isaaclab/utils/dict.py
Lines 102 to 106 in b1cd175
This seems to solve the issue/limitation. However, I am not sure if this would break something else, somewhere else. If you could provide feedback on this for a robust solution, I could create a PR accordingly.
RandomOakForest commentedon May 13, 2025
Thanks for submitting this. Would you like to submit a PR that we could review?
ozhanozen commentedon May 16, 2025
Hi @RandomOakForest , I have done so.
Modifies `update_class_from_dict()` to wholesale replace flat Iterabl…
Modifies `update_class_from_dict()` to wholesale replace flat Iterabl…
Modifies `update_class_from_dict()` to wholesale replace flat Iterabl…
Modifies `update_class_from_dict()` to wholesale replace flat Iterabl…