Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[air] Do not warn of
checkpoint_dir
if it's coming from us (base_tr…
…ainer). (ray-project#26259) Currently, the following information will be printed even the user is not directly using a tune function. This is confusing and not actionable. ``` "`checkpoint_dir` in `func(config, checkpoint_dir)` is " "being deprecated. " "To save and load checkpoint in trainable functions, " "please use the `ray.air.session` API:\n\n" "from ray.air import session\n\n" "def train(config):\n" " # ...\n" ' session.report({"metric": metric}, checkpoint=checkpoint)\n\n' "For more information please see " "https://docs.ray.io/en/master/ray-air/key-concepts.html#session\n" ``` The new logic check if `base_trainer` is in the call stack and only adds the warning message when it is not. The new logic will be removed once internally we migrate to use `session` API.
- Loading branch information