-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rl config #50
Merged
Merged
Fix rl config #50
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1e9b410
fix: import path for moved utils file
fabioseel 8682dcd
fix: adjust config paths and fix load brain methods
fabioseel fc0bdd7
add example rl configs
fabioseel 90e9391
fix: change optimizer referencing in to_sf_cfg
fabioseel 86088a4
fix: add brain factory method as interface
fabioseel 98eea38
fix: back and forth of config loses DictConfig . accessing
fabioseel d908f28
fix: update config after change in model
fabioseel a559a12
fix: wrong reference in create_brain
fabioseel 6161013
fix: sample_factory needs optimizer in lowercase
fabioseel d1dabb5
autofix by ruff on changed files
fabioseel 30f3a2d
bugfix: lint.sh with just --fix works now
fabioseel 447d4fe
fix: merge isinstance calls, add/remove return statements etc
fabioseel 39c4ba6
fix: optimizer has to be provided, remove check
fabioseel 3478315
fix: split complex function
fabioseel 7168e02
doc: mark rl analysis stuff as deprecated
fabioseel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: feedforward | ||
sensors: | ||
vision: | ||
- 3 | ||
- ${dataset.vision_height} | ||
- ${dataset.vision_width} | ||
connections: | ||
- ["vision", "encoder"] | ||
- ["encoder", "action_decoder"] | ||
circuits: | ||
encoder: | ||
_target_: retinal_rl.models.circuits.convolutional.ConvolutionalEncoder | ||
num_layers: 3 | ||
num_channels: [4,8,16] | ||
kernel_size: 6 | ||
stride: 2 | ||
activation: ${activation} | ||
action_decoder: | ||
_target_: retinal_rl.models.circuits.fully_connected.FullyConnected | ||
output_shape: ${action_decoder_out} | ||
hidden_units: ${latent_dimension} | ||
activation: ${activation} | ||
|
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,6 @@ | ||
name: rl-apples | ||
|
||
env_name: gathering-apples | ||
vision_width: 160 | ||
vision_height: 120 | ||
input_satiety: true |
17 changes: 17 additions & 0 deletions
17
resources/config_templates/user/experiment/gathering-apples.yaml
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,17 @@ | ||
# @package _global_ | ||
defaults: | ||
- _self_ | ||
- override /dataset: rl-apples | ||
- override /brain: feedforward | ||
- override /optimizer: rl-base | ||
|
||
framework: rl | ||
|
||
### Interpolation Parameters ### | ||
|
||
# This is a free list of parameters that can be interpolated by the subconfigs | ||
# in sweep, dataset, brain, and optimizer. A major use for this is interpolating | ||
# values in the subconfigs, and then looping over them in a sweep. | ||
activation: "elu" | ||
latent_dimension: [2048,1024] | ||
action_decoder_out: [512] |
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,7 @@ | ||
# The optimizer to use | ||
optimizer: # torch.optim Class and parameters | ||
_target_: torch.optim.Adam | ||
lr: 0.0003 | ||
|
||
# The objective function | ||
# TODO: Implement in RL and update config |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you use this it all, but you can probably delete this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah mostly. There were some things I wanted to look into / compare, but maybe I can add @ deprecated for now already
(rest of this will be addressed in #35 )