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

Modify default_action to make function calls that use given mdp/pomdp #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

himanshugupta1009
Copy link

@himanshugupta1009 himanshugupta1009 commented Jun 17, 2024

Used Base.depwarn to raise the warning message (with force display off)

Copy link
Member

@zsunberg zsunberg left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this, @himanshugupta1009 ! I suggested a couple changes to the warning to make it more specific. Also, I have two additional requests:

  1. Can we make the depwarn only happen if we are sure that the problem has to do with the function only having two arguments? I don't think we want the depwarn to show up if the user has given f(m, s, a) but there is just another unrelated error in that function - that would be confusing. The best way to do this would be to look at e and see if it is a MethodError that matches what we would expect.
  2. Can we add tests that exercise both of these code branches?

Comment on lines +11 to +12
Base.depwarn("""Modify the function definition to take three arguments, i.e., f(mdp,s,ex) instead of f(s,ex). The older version will be deprecated soon.""",
:MCTS)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Base.depwarn("""Modify the function definition to take three arguments, i.e., f(mdp,s,ex) instead of f(s,ex). The older version will be deprecated soon.""",
:MCTS)
Base.depwarn("""Modify the function used for the default action in MCTS to take three arguments, i.e., f(mdp,s,ex) instead of f(s,ex). The older version will be deprecated soon.""",
:MCTS_default_action_deprecation)

Copy link
Member

Choose a reason for hiding this comment

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

Also, it is better for warnings to describe what the problem is before saying what the user should do to resolve it. For example

The two-argument version of the default action function in MCTS is deprecated. Modify it to take three arguments, i.e., f(mdp,s,ex) instead of f(s,ex).

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.

2 participants