-
Notifications
You must be signed in to change notification settings - Fork 23
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
Clarify raptor tutorial #3052
Clarify raptor tutorial #3052
Conversation
It is not completely clear how one can use a local function in the existing tutorial. This is easily remedied.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -152,7 +152,7 @@ | |||
"source": [ |
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.
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.
Yes, sorry for that. I made a local branch and tried to push directly to the parent repo. When I saw that I didn't have permissions (perhaps such development is discouraged?), I just used the editor on github. I just forgot to also remove this line.
On a related note though, I could not get the args to work. Perhaps some documentation on how to use this is in order?
{'mode' : rp.TASK_FUNCTION, 'function' : 'msg', 'args' : [3]} # Fails
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.
Oh, let me check that! Thanks for noting this!
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.
Sorry, I was a bit blind and should have seen that quicker. But also it points to a lack of documentation.
What happened is not that the args
do not work, but rather that the 'function': 'msg'
is the problem. The function msg
is not defined in the namespace of the raptor worker, as it only defined in the client code. So the symbolic reference (the string 'msg'
) cannot be resolved and the call fails. In the earlier version you used (msg(3)
), the function (and its arguments!) is/are serialized and passed to the raptor worker and then are available there.
I will open a documentation ticket for this - but I think it has no immediate bearing on the proposed notebook change. (see #3057)
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.
I agree that this notebook change can go forward in parallel to any changes to documentation or implementation of raptor. I just wanted to raise the issue somewhere. It is generally preferable to bring such things up in issues, but I was not sure if there was a way to make it work that I was just missing.
Please let me know if anything more is needed from my end for this PR.
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.
Ack! This looks good to me now. Thanks!
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.
LGTM - Thanks!
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.
It seems like a json error has crept into the notebook - it does not parse right now...
https://github.com/radical-cybertools/radical.pilot/actions/runs/6467348997/job/17557212094?pr=3052
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 - this will be merged as soon as the tests pass 🙂
It is not completely clear how one can use a local function in the existing tutorial. This is easily remedied.