-
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(zc): add bcq algorithm #640
Conversation
add paper link and a training curve figure in PR |
ding/example/bcq.py
Outdated
from ding.utils import set_pkg_seed | ||
from dizoo.d4rl.envs import D4RLEnv | ||
from dizoo.d4rl.config.halfcheetah_medium_bcq_config import main_config, create_config | ||
# from dizoo.d4rl.config.halfcheetah_medium_expert_edac_config import main_config,create_config |
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 unused codes.
vae_hidden_dims: List = [750, 750], | ||
phi: float = 0.05 | ||
) -> None: | ||
super(BCQ, self).__init__() |
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.
add note for arguments.
ding/model/template/bcq.py
Outdated
different computation graph, including ``compute_actor`` and ``compute_critic`` in QAC. | ||
Mode compute_actor: | ||
Arguments: | ||
- inputs (:obj:`torch.Tensor`): Observation data, defaults to tensor. |
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.
arguments object type is Union[torch.Tensor, Dict[str, torch.Tensor]] for inputs?
dizoo/d4rl/entry/d4rl_bcq_main.py
Outdated
|
||
def train(args): | ||
# launch from anywhere | ||
config = Path(__file__).absolute().parent.parent / 'config' / args.config |
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.
import from dizoo config file directly?
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.
yes, I copy this from other d4rl_*_main.py
Codecov Report
@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 82.34% 82.49% +0.15%
==========================================
Files 584 583 -1
Lines 47270 47698 +428
==========================================
+ Hits 38924 39350 +426
- Misses 8346 8348 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description
Add bcq algorithm
TODO
Add algorithm and config
BCQ paper :https://arxiv.org/pdf/1812.02900.pdf
reference implementation :https://github.com/sfujim/BCQ
Check List