Skip to content

Conversation

@james-isbister
Copy link
Collaborator

@james-isbister james-isbister commented Oct 20, 2025

  • 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

@james-isbister james-isbister marked this pull request as ready for review October 20, 2025 13:13
@james-isbister james-isbister changed the title run_task_for_single_config_asset added launch_task_for_single_config_asset Oct 20, 2025
@james-isbister james-isbister changed the title launch_task_for_single_config_asset Generic launch_task_for_single_config_asset script Oct 20, 2025
db_client = Client(token_manager=token, project_context=project_context)

run_task_for_single_config_asset(
entity_type=entity_type,
Copy link
Contributor

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.

Copy link
Collaborator Author

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

Copy link
Contributor

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.

Copy link
Collaborator Author

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

@james-isbister
Copy link
Collaborator Author

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?

@james-isbister james-isbister merged commit f7d519f into main Oct 24, 2025
4 checks passed
@james-isbister james-isbister deleted the generic_launch_script branch October 24, 2025 08:34
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.

4 participants