Fix IQL configuration and CQL/DT dependency issues in ablation studies#14
Fix IQL configuration and CQL/DT dependency issues in ablation studies#14google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
- Infer `is_discrete` and `act_dim` from the environment in `run_experiment.py` to fix IQL initialization when dataset metadata is incomplete. - Conditionally import `SpikingSelfAttention` in `src/models/__init__.py` to prevent crashes in non-spiking models (CQL, DT) when `norse` is not installed. - Safely handle loss logging in `run_experiment.py` to support both tensor and float loss values. - Verified fixes by running IQL and CQL ablation experiments on CartPole-v1.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Fixes critical issues preventing ablation studies for IQL, CQL, and DT models from running.
run_experiment.pynow automatically infersis_discrete,act_dim, andstate_dimfrom the Gym environment if these parameters are missing from the configuration. This resolves theAttributeError: 'AttrDict' object has no attribute 'is_discrete'error.norseDependency:src/models/__init__.pywas modified to wrap the import ofSpikingSelfAttentionin atry-except ImportErrorblock. This allows non-spiking models (CQL, DT, IQL) to run in environments where thenorselibrary (required only for SNNs) is not installed.run_experiment.pywas updated to check iflossis a PyTorch tensor before calling.item(), preventingAttributeError: 'float' object has no attribute 'item'when the loss is already a float.These changes ensure the ablation study pipeline is robust and functional across different models and environments.
PR created automatically by Jules for task 13904231114388625638 started by @Vishal-sys-code