-
Notifications
You must be signed in to change notification settings - Fork 0
Generic launch_task_for_single_config_asset script #428
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
Conversation
| db_client = Client(token_manager=token, project_context=project_context) | ||
|
|
||
| run_task_for_single_config_asset( | ||
| entity_type=entity_type, |
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 think we should have a return code.
And a convention for task manager (@eleftherioszisis ) , what do we do with the return code.
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.
Can this wait for a future PR. See comment below
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.
sure, but this is important. no return code means we don't know if that was a success or not , so that is not great.
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.
Ok, I'll add 0 for success and 1 for an error then for now
|
I've addressed the comments @jdcourcol @eleftherioszisis @pgetta Except for the return code. Can you recommend a return code for the script? Or we leave it for another PR? |
Generic script "launch_task_for_single_config_asset.py", which takes as inputs:
entity_type_str
entity_id
asset_id
token
lab_id
project_id
The script downloads into memory the specified asset which should be the obi_one SingleConfig json (for a single coordinate in a scan).
The script then determines and executes the corresponding task
For example, this would be used to execute a single circuit extraction or single ion channel optimization (where the campaign and single configs have already been generated and registered to entitycore by a call to the obi-one service).
This script could be used by @pgetta 's service and task manager. This can be adapted, but in the short term this is needed for the ion channel modeling service @AurelienJaquier
Not sure if the passing of the token is appropriate