-
Notifications
You must be signed in to change notification settings - Fork 373
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
feature(zjow): add wandb logger features; fix relative bugs for wandb online logger #579
Merged
Merged
Changes from 13 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
e571f50
td3 fix
zjowowen a614e3f
Merge branch 'opendilab:main' into benchmark-2
zjowowen 9060c53
Add benchmark config file.
zjowowen 731a2ad
Merge branch 'opendilab:main' into benchmark-2
zjowowen 82a4944
add main
zjowowen ad616ff
fix
zjowowen f1aba9c
fix
zjowowen 448daa1
add feature to wandb;fix bugs
zjowowen 1e18f25
merge main
zjowowen 8de9b9e
format code
zjowowen f36bec8
remove files.
zjowowen e5ec188
polish code
zjowowen 46f64e6
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen e520359
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen 6a9a565
fix td3 policy
zjowowen 0222c04
Add td3
zjowowen 929776b
Add td3 env
zjowowen 4fba3b9
Add td3 env
zjowowen 0257ae9
polish code
zjowowen cccd585
polish code
zjowowen d7f272e
polish code
zjowowen 902f9b0
polish code
zjowowen 17ba3a6
polish code
zjowowen 21dcc8b
polish code
zjowowen bb0df37
polish code
zjowowen d01558d
polish code
zjowowen 60f47b6
polish code
zjowowen 511d71e
polish code
zjowowen 6a9fd45
polish code
zjowowen d5573e9
polish code
zjowowen b7c2011
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen 0a167f1
Merge branch 'opendilab:main' into benchmark-3
zjowowen 3906543
fix data type error for mujoco
zjowowen e665493
polish code
zjowowen 88f5181
polish code
zjowowen 693a4cb
Add features
zjowowen e6bd0c5
fix base env manager readyimage
zjowowen cdb9928
polish code
zjowowen 3015a92
remove NoReturn
zjowowen 6e7041b
remove NoReturn
zjowowen c97a8d4
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen fe415b2
format code
zjowowen 8f808b2
merge from main
zjowowen 3432754
format code
zjowowen 3f6ef3d
polish code
zjowowen 535fd77
polish code
zjowowen 4271610
fix logger
zjowowen ba0979b
format code
zjowowen 3c19c2c
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen 82826e2
format code
zjowowen da0dd12
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen bb35f90
Merge branch 'main' of https://github.com/zjowowen/DI-engine into ben…
zjowowen 5340658
change api for ckpt; polish code
zjowowen 2d3f6c8
polish code
zjowowen 2e8292c
merge from main
zjowowen 2f883d7
format code
zjowowen 3c15c84
polish code
zjowowen 6ce1421
fix load bug
zjowowen eac9434
fix bug
zjowowen 6fda31b
fix dtype error
zjowowen 6b9def4
polish code
zjowowen 6f49d0a
polish code
zjowowen 4c69cb0
Polish code
zjowowen 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
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 |
---|---|---|
|
@@ -257,7 +257,7 @@ def _evaluate(ctx: Union["OnlineRLContext", "OfflineRLContext"]): | |
eval_monitor.update_video(env.ready_imgs) | ||
eval_monitor.update_output(inference_output) | ||
output = [v for v in inference_output.values()] | ||
action = [to_ndarray(v['action']) for v in output] # TBD | ||
action = np.array([to_ndarray(v['action']) for v in output]) # TBD | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same problem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
timesteps = env.step(action) | ||
for timestep in timesteps: | ||
env_id = timestep.env_id.item() | ||
|
@@ -282,7 +282,8 @@ def _evaluate(ctx: Union["OnlineRLContext", "OfflineRLContext"]): | |
raise TypeError("not supported ctx type: {}".format(type(ctx))) | ||
ctx.last_eval_iter = ctx.train_iter | ||
ctx.eval_value = episode_return | ||
ctx.eval_output = {'reward': episode_return} | ||
ctx.last_eval_value = ctx.eval_value | ||
ctx.eval_output = {'episode_return': episode_return} | ||
episode_info = eval_monitor.get_episode_info() | ||
if episode_info is not None: | ||
ctx.eval_output['episode_info'] = episode_info | ||
|
@@ -374,6 +375,7 @@ def _evaluate(ctx: "OnlineRLContext"): | |
) | ||
ctx.last_eval_iter = ctx.train_iter | ||
ctx.eval_value = episode_return_mean | ||
ctx.last_eval_value = ctx.eval_value | ||
ctx.eval_output = {'episode_return': episode_return} | ||
episode_info = eval_monitor.get_episode_info() | ||
if episode_info is not None: | ||
|
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.
remove this
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.
fixed