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

Generate_and_run endpoint fails at loss generation #905

Closed
sambles opened this issue Sep 26, 2023 · 0 comments · Fixed by #945
Closed

Generate_and_run endpoint fails at loss generation #905

sambles opened this issue Sep 26, 2023 · 0 comments · Fixed by #945
Assignees
Milestone

Comments

@sambles
Copy link
Contributor

sambles commented Sep 26, 2023

Issue Description

When calling generate and run the output stage of generate-oasis-files is not correctly linked to the input of generate-losses

See this func from the Platform 1 version of the code before it was scrapped for Platform 2, somthing must have broken when porting the change over to the newer verison.

@property
def run_analysis_chain_signature(self):
delete_prev_output(self, ['input_file'])
complex_data_files = self.create_complex_model_data_file_dicts()
input_file = file_storage_link(self.input_file)
settings_file = file_storage_link(self.settings_file)
return signature(
'run_analysis_chain',
args=(self.pk, input_file, settings_file, complex_data_files),
queue=self.model.queue_name,
)

[2023-09-26 09:43:13,230: ERROR/ForkPoolWorker-8] Task prepare_losses_generation_directory[8370cb83-1329-4755-9e76-b47383362364] raised unexpected: OasisException('The path /tmp/run/analysis-60_losses-59b7de781f904187b6964b56394f66ff/input-data (Path to the directory in which to generate the Oasis files) must exist for Computation Step GenerateLossesDir')
Traceback (most recent call last):
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/autoretry.py", line 60, in run
    ret = task.retry(exc=exc, **retry_kwargs)
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/task.py", line 736, in retry
    raise_with_context(exc)
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/autoretry.py", line 38, in run
    return task._orig_run(*args, **kwargs)
  File "/home/worker/src/model_execution_worker/distributed_tasks.py", line 942, in run
    return fn(self, params, *args, analysis_id=analysis_id, **kwargs)
  File "/home/worker/src/model_execution_worker/distributed_tasks.py", line 990, in prepare_losses_generation_directory
    params['analysis_settings'] = OasisManager().generate_losses_dir(**params)
  File "/home/worker/.local/lib/python3.10/site-packages/oasislmf/utils/log.py", line 123, in wrapper
    result = func(*args, **kwargs)
  File "/home/worker/.local/lib/python3.10/site-packages/oasislmf/manager.py", line 86, in interface
    return computation_cls(**kwargs).run()
  File "/home/worker/.local/lib/python3.10/site-packages/oasislmf/computation/base.py", line 56, in __init__
    raise OasisException(
oasislmf.utils.exceptions.OasisException: The path /tmp/run/analysis-60_losses-59b7de781f904187b6964b56394f66ff/input-data (Path to the directory in which to generate the Oasis files) must exist for Computation Step GenerateLossesDir
@sambles sambles self-assigned this Sep 26, 2023
@sambles sambles changed the title Generate and run fails on loss generation Generate_and_run endpoint fails at loss generation Sep 26, 2023
@sambles sambles mentioned this issue Oct 5, 2023
10 tasks
@sambles sambles linked a pull request Jan 16, 2024 that will close this issue
@sambles sambles mentioned this issue Jan 16, 2024
15 tasks
@awsbuild awsbuild added this to the 2.3.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants