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

Fix logging of GPU ID #95

Merged
merged 7 commits into from
Oct 9, 2024
Merged

Conversation

VibhuJawa
Copy link
Member

This PR fixes: #55.

For context/understanding see below:

from distributed import get_worker
def get_worker_name():
    worker = get_worker()  
    return worker.name
    
# Submit the function to all workers
futures = [client.submit(get_worker_name, pure=False) for _ in range(0,10)]
worker_names = client.gather(futures)
print(worker_names)
[3, 0, 6, 3, 5, 2, 4, 7, 3, 1]

Comment on lines +30 to +32
@property
def worker_name(self):
return getattr(self.get_worker(), "name", 0)
Copy link
Contributor

@praateekmahajan praateekmahajan Oct 9, 2024

Choose a reason for hiding this comment

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

For my own understanding, historically it was returning zero because... self was constructed on client and that value persisted or..?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah exactly that

@VibhuJawa VibhuJawa merged commit d7e2643 into rapidsai:main Oct 9, 2024
10 checks passed
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.

[BUG] Fix logging of prediction pipelines
2 participants