-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[air/output] Fix excluded keys in results and config #36764
Conversation
Signed-off-by: Kai Fricke <kai@anyscale.com>
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.
One question: now it's only possible to exclude a full top-level key. Is the exclude
key configurable by users or is it just used internally? I remember the trial output table can be configured to only show a certain set of columns, but I think that's a separate path.
That's a good point - looks like this won't work for nested metrics (e.g. this will break rllib). I'll update the PR early next week |
Signed-off-by: Kai Fricke <kai@anyscale.com>
@justinvyu updated, PTAL |
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.
Thanks!
A few other points:
- Can we test the
include
behavior as well? - The only usage of
include
is here:ray/python/ray/tune/experimental/output.py
Line 1017 in 9f25850
include=self._metrics,
- The metrics field is populated by: https://github.com/ray-project/ray/blob/9f258506bbcd58763b032b416a90cd00152bfe33/python/ray/tune/tune.py#L958C55-L958C55
- This gets a
_progress_metrics
attribute from theTrainable
, but I don't think this thing is ever set anywhere. Can we remove the usage ofinclude
here? We can keep the include functionality for the future (ex: make it customizable as a user config).
It's actually used in rllib, e.g. here: https://github.com/ray-project/ray/blob/master/rllib/algorithms/algorithm.py#L211-L218 |
Signed-off-by: Kai Fricke <kai@anyscale.com>
We are currently applying the `exclude` keys on the flattened results, but this will not work if the excluded keys are dictionaries, such as the `config` value in the results dict. Instead, we should operate on the original results dict and only flatten from the second level onwards. Signed-off-by: Kai Fricke <kai@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Why are these changes needed?
We are currently applying the
exclude
keys on the flattened results, but this will not work if the excluded keys are dictionaries, such as theconfig
value in the results dict. Instead, we should operate on the original results dict and only flatten from the second level onwards.Related issue number
Closes #36756
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.