Skip to content
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

Dreamerクラスの実装 #47

Merged
merged 31 commits into from
Jan 29, 2023
Merged

Dreamerクラスの実装 #47

merged 31 commits into from
Jan 29, 2023

Conversation

Geson-anko
Copy link
Collaborator

@Geson-anko Geson-anko commented Jan 24, 2023

概要

#32 #33 TrainerとDreamerの実装ブランチです。
Dreamerのクラスの実装のみ完了しました。

変更内容

  • src/models/dreamer.py
  • src/trainer.py

影響範囲

上記ファイル
trainer.pyはdreamer.pyに依存します

Submit前の確認項目

  • タイトルは一目でわかるようにし、説明文は PR を簡潔に説明するようにしましたか?
  • あなたの PR が、異なる変更を束ねたものではなく、ひとつのことだけを行うものであることを確認しましたか?
  • この PR で導入されたすべての変更点をリストアップしましたか?
  • PR を pytestまたは make testコマンドでローカルにテストしましたか?
  • pre-commit run -a またはmake formatコマンドで pre-commit フックを実行しましたか?

補足

@Geson-anko Geson-anko marked this pull request as draft January 24, 2023 04:01
@Geson-anko Geson-anko self-assigned this Jan 24, 2023
@Geson-anko Geson-anko added the enhancement New feature or request label Jan 24, 2023
@Geson-anko Geson-anko added this to the 実験準備が整う milestone Jan 24, 2023
@cehl-kurage cehl-kurage self-assigned this Jan 26, 2023
@cehl-kurage cehl-kurage marked this pull request as ready for review January 28, 2023 04:35
@cehl-kurage cehl-kurage assigned Geson-anko and unassigned Geson-anko Jan 28, 2023
Copy link
Collaborator Author

@Geson-anko Geson-anko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

素晴らしいです。ほんの少し修正があるのでよろしくお願いします

src/models/dreamer.py Outdated Show resolved Hide resolved
src/models/dreamer.py Outdated Show resolved Hide resolved
tests/models/test_dreamer.py Show resolved Hide resolved
tests/models/test_dreamer.py Show resolved Hide resolved
tests/models/test_dreamer.py Outdated Show resolved Hide resolved
tests/models/test_dreamer.py Outdated Show resolved Hide resolved
tests/models/test_dreamer.py Outdated Show resolved Hide resolved
tests/models/test_dreamer.py Outdated Show resolved Hide resolved
Comment on lines 203 to 204
device = self.agent.hidden.device
dtype = self.agent.hidden.dtype
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
device = self.agent.hidden.device
dtype = self.agent.hidden.dtype
device = self.device
dtype = self.dtype

@@ -45,7 +45,7 @@ def forward(
next_obs: _tensor_or_any,
*args: Any,
**kwds: Any,
) -> tuple[_dist_or_any, _dist_or_any, _tensor_or_any]:
) -> tuple[_dist_or_any, _dist_or_any, _tensor_or_any, _tensor_or_any]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここの変更は何によって生まれたのでしょうか?

Suggested change
) -> tuple[_dist_or_any, _dist_or_any, _tensor_or_any, _tensor_or_any]:
) -> tuple[_dist_or_any, _dist_or_any, _tensor_or_any]:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

記憶にない変更です...(??)
もとに戻しておきます

@Geson-anko Geson-anko removed their assignment Jan 28, 2023
@Geson-anko Geson-anko changed the title Feature/#32#33dreamer trainer Dreamerクラスの実装 Jan 28, 2023
@cehl-kurage cehl-kurage merged commit 3256ce1 into main Jan 29, 2023
@cehl-kurage cehl-kurage deleted the feature/#32#33dreamer-trainer branch January 29, 2023 01:29
@cehl-kurage cehl-kurage restored the feature/#32#33dreamer-trainer branch January 29, 2023 01:29
@Geson-anko Geson-anko deleted the feature/#32#33dreamer-trainer branch February 5, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants