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

Add a check for step dependencies ? #34

Open
enricotagliavini opened this issue Mar 20, 2023 · 0 comments
Open

Add a check for step dependencies ? #34

enricotagliavini opened this issue Mar 20, 2023 · 0 comments
Labels
enhancement New feature or request low priority

Comments

@enricotagliavini
Copy link
Contributor

It can happen to skip a step by mistake and get an unlcear error due to missing inputs. For example task 03 can fail with

[2023-03-20 10:15:36+0100] INFO - prefect.TaskRunner | Task 'link_nuclei_task[1]': Starting task run...
Measurment regionprops_ovr_C01 does not exist in C03:[].
[2023-03-20 10:15:36+0100] INFO - prefect.TaskRunner | Task 'link_nuclei_task[0]': Starting task run...
Measurment regionprops_ovr_C01 does not exist in C03:[].
[2023-03-20 10:15:36+0100] ERROR - prefect.TaskRunner | Task 'link_nuclei_task[1]': Exception encountered during task execution!
Traceback (most recent call last):
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/scmp_venv/lib64/python3.8/site-packages/prefect/engine/task_runner.py", line 880, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/scmp_venv/lib64/python3.8/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "./scripts/prefect/03_nuclear_multiplex.py", line 62, in link_nuclei_task
    link_nuclei(
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/gliberal-scMultipleX/src/scmultiplex/linking/NucleiLinking.py", line 39, in link_nuclei
    R0_df_ovr, R0_df_org = load_organoid_measurement(organoid, org_seg_ch)
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/gliberal-scMultipleX/src/scmultiplex/linking/NucleiLinking.py", line 21, in load_organoid_measurement
    df_ovr = df_ovr.set_index("org_id")
AttributeError: 'NoneType' object has no attribute 'set_index'
[2023-03-20 10:15:36+0100] ERROR - prefect.TaskRunner | Task 'link_nuclei_task[0]': Exception encountered during task execution!
Traceback (most recent call last):
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/scmp_venv/lib64/python3.8/site-packages/prefect/engine/task_runner.py", line 880, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/scmp_venv/lib64/python3.8/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "./scripts/prefect/03_nuclear_multiplex.py", line 62, in link_nuclei_task
    link_nuclei(
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/gliberal-scMultipleX/src/scmultiplex/linking/NucleiLinking.py", line 39, in link_nuclei
    R0_df_ovr, R0_df_org = load_organoid_measurement(organoid, org_seg_ch)
  File "/tungstenfs/nobackup/gliberal/taglenri/nicole/gliberal-scMultipleX/src/scmultiplex/linking/NucleiLinking.py", line 21, in load_organoid_measurement
    df_ovr = df_ovr.set_index("org_id")
AttributeError: 'NoneType' object has no attribute 'set_index'
[2023-03-20 10:15:36+0100] INFO - prefect.TaskRunner | Task 'link_nuclei_task[1]': Finished task run for task with final state: 'Failed'
[2023-03-20 10:15:36+0100] INFO - prefect.TaskRunner | Task 'link_nuclei_task[0]': Finished task run for task with final state: 'Failed'
[2023-03-20 10:15:36+0100] INFO - prefect.FlowRunner | Flow run FAILED: some reference tasks failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

2 participants