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

Suppress metadata matching between different results_job*.json #266

Merged
merged 3 commits into from Feb 8, 2022

Conversation

rajeee
Copy link
Contributor

@rajeee rajeee commented Feb 7, 2022

Fixes #265.

Pull Request Description

Different results_jobX.json files can have different datatype for the same column.
This happens when some results_jobX.json have failed simulation and the datetypes in that results_jobX.json is chosen by pandas to support missing values. That means, the dtype for numeric column cannot be int (because int datatype cannot support missing value) and it will be downcast to something like float or object. But other results_jobX.json may not have any failed simulation, so the datatype can be more specific like int64. This results in metadata mismatch error when dask tries to read them those multiple dataframes into single dataframe. This PR 'fixes' the issue by suppressing this metadata verification between different dataframes returned by the delayed objects. The default behavior when meta verification is disabled is that (empirically tested) the final datatype is chosen such that it can represent the values in both of the dataframes. This behavior seems consistent with the existing behavior where we loaded everything into a single pandas dataframe.

Checklist

Not all may apply

  • Code changes (must work)
  • Tests exercising your feature/bug fix (check coverage report on CircleCI build -> Artifacts)
  • All other unit tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run to make sure it all works (local is fine, unless an Eagle specific feature)
  • Add to the changelog_dev.rst file and propose migration text in the pull request

@rajeee
Copy link
Contributor Author

rajeee commented Feb 7, 2022

Being tested in eagle

@rajeee
Copy link
Contributor Author

rajeee commented Feb 7, 2022

Eagle test successful. Postprocessing now works for the run for which it was failing previously.

@rajeee rajeee requested a review from nmerket February 7, 2022 21:07
Copy link
Member

@nmerket nmerket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. 👍

quick fix

Any way you could add a unit test to show that it works?

@rajeee rajeee requested a review from nmerket February 8, 2022 16:41
@rajeee rajeee merged commit e51b4ac into develop Feb 8, 2022
@rajeee rajeee deleted the fix_meta_error branch February 8, 2022 16:43
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.

Column Mismatch in Post-processing
2 participants