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

Calibration run failing with KeyError: 'squeeze_factor' #1567

Closed
tamuri opened this issue Jan 8, 2025 · 2 comments · Fixed by #1571
Closed

Calibration run failing with KeyError: 'squeeze_factor' #1567

tamuri opened this issue Jan 8, 2025 · 2 comments · Fixed by #1571
Assignees
Labels
bug Something isn't working

Comments

@tamuri
Copy link
Collaborator

tamuri commented Jan 8, 2025

Failing on post-processing step with:

Traceback (most recent call last):
  File "/mnt/tlo/a23189d841d8d43431c30451a2f85b404810807b/src/scripts/calibration_analyses/analysis_scripts/process.py", line 16, in <module>
    process(_output_dir_for_processed,
  File "/mnt/tlo/a23189d841d8d43431c30451a2f85b404810807b/src/scripts/calibration_analyses/analysis_scripts/process.py", line 9, in process
    function(scenario_runs_dir, output_dir, resources_dir)
  File "/mnt/tlo/a23189d841d8d43431c30451a2f85b404810807b/src/scripts/calibration_analyses/analysis_scripts/analysis_all_calibration.py", line 28, in apply
    analysis_hsi_descriptions.apply(
  File "/mnt/tlo/a23189d841d8d43431c30451a2f85b404810807b/src/scripts/calibration_analyses/analysis_scripts/analysis_hsi_descriptions.py", line 807, in apply
    figure7_squeeze_factors(
  File "/mnt/tlo/a23189d841d8d43431c30451a2f85b404810807b/src/scripts/calibration_analyses/analysis_scripts/analysis_hsi_descriptions.py", line 745, in figure7_squeeze_factors
    sorted_squeeze_factors = squeeze_factor_by_hsi.sort_values(['squeeze_factor']).reset_index(drop=True)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/tlo/env-a23189d841d8d43431c30451a2f85b404810807b/lib/python3.11/site-packages/pandas/core/frame.py", line 6758, in sort_values
    k = self._get_label_or_level_values(by, axis=axis)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/tlo/env-a23189d841d8d43431c30451a2f85b404810807b/lib/python3.11/site-packages/pandas/core/generic.py", line 1778, in _get_label_or_level_values
    raise KeyError(key)
KeyError: 'squeeze_factor'
@tamuri tamuri added the bug Something isn't working label Jan 8, 2025
@tamuri tamuri changed the title Calibration run failing Calibration run failing with KeyError: 'squeeze_factor' Jan 8, 2025
@tamuri
Copy link
Collaborator Author

tamuri commented Jan 9, 2025

I've uploaded the latest output of calibration runs (830MB) - might make it easier to test post-processing.

@tbhallett
Copy link
Collaborator

Thanks for that @tamuri --- helped a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants