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

Merge agent and agent policy #162

Merged
merged 13 commits into from
Nov 17, 2020
Merged

Merge agent and agent policy #162

merged 13 commits into from
Nov 17, 2020

Conversation

davidrusu
Copy link
Contributor

@davidrusu davidrusu commented Nov 16, 2020

This PR merges Agent + AgentPolicy. The motivation for this change is to simplify our API surface area before we take on heterogeneous agent computing directly in #75.

AgentPolicy and Agent were nearly identical classes, doesn't make sense to have both.

I've made sure to keep these changes backwards compatible. We print noisy messages to our users to switch to the Agent class if we detect old api useage, but from a functional point of view, things should just work with the old API as well.

fixes #88

benchmark/default_model.py Outdated Show resolved Hide resolved
@Gamenot Gamenot requested review from Gamenot, junluo-huawei and Adaickalavan and removed request for junluo-huawei and Gamenot November 16, 2020 22:36
@davidrusu davidrusu force-pushed the merge-agent-and-agent-policy branch from f59f6f6 to 993f5d0 Compare November 17, 2020 16:17
class AgentPolicy(Agent):
# we cannot use debtcollector here to signal deprecation because the wrapper object is
# not pickleable, instead we simply print.
print("[DEPRECATED] AgentPolicy has been replaced with `smarts.core.agent.Agent`")
Copy link
Contributor

Choose a reason for hiding this comment

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

log a warning (via global logger) vs a print?

# the action_adapter and ensure the controller accepts
# the produced action.
del policy
print(f"[DEPRECATED] `perform_self_test` has been deprecated: {self}")
Copy link
Contributor

Choose a reason for hiding this comment

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

logs instead of prints?

@JVillella
Copy link
Contributor

Nice changes :)

@davidrusu davidrusu force-pushed the merge-agent-and-agent-policy branch from 4afa6b9 to 1d877ef Compare November 17, 2020 17:46
@davidrusu davidrusu force-pushed the merge-agent-and-agent-policy branch from a3bf17d to 8fff537 Compare November 17, 2020 18:29
@davidrusu davidrusu merged commit 1bc97d8 into master Nov 17, 2020
@davidrusu davidrusu deleted the merge-agent-and-agent-policy branch November 17, 2020 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge Agent and Policy
3 participants