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

[tune] sync_client: Fix delete template formatting #19553

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

krfricke
Copy link
Contributor

Why are these changes needed?

Running into:

(pid=451) 2021-10-20 08:58:13,409	ERROR worker.py:80 -- Unhandled error (suppress with RAY_IGNORE_UNHANDLED_ERRORS=1): ray::ImplicitFunc.delete_checkpoint() (pid=522, ip=172.31.30.220, repr=<ray.tune.function_runner.ImplicitFunc object at 0x7fc292f45e50>)
(pid=451)   File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/tune/durable_trainable.py", line 105, in delete_checkpoint
(pid=451)     self.storage_client.delete(self._storage_path(local_dirpath))
(pid=451)   File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/tune/sync_client.py", line 270, in delete
(pid=451)     final_cmd = self.delete_template.format(target=quote(target))
(pid=451) KeyError: 'options'
(run pid=451) == Status ==

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Comment on lines +270 to +271
final_cmd = self.delete_template.format(
target=quote(target), options="")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This seems to be the only place we call delete_template, but options is hardcoded to be empty. Should we just remove the {options} altogether in the definition of delete_template or is this more for future compatibility?

@@ -267,7 +267,8 @@ def delete(self, target):
if self.is_running:
logger.warning("Last sync client cmd still in progress, skipping.")
return False
final_cmd = self.delete_template.format(target=quote(target))
final_cmd = self.delete_template.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: update the docstring of delete_template?

@krfricke krfricke merged commit 44fb7d0 into ray-project:master Oct 21, 2021
@krfricke krfricke deleted the tune/sync-delete-fix branch October 21, 2021 09:59
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.

3 participants