Skip to content

Serialized objects stored with one FTYPE fail to load with different FTYPE #437

Open
@jllanfranchi

Description

@jllanfranchi

This shows up e.g. when running test_command_lines.sh (towards the end). log binning stored in FP32 is loaded with PISA running in FP64, and this fails the check if the bin edges are actually logarithmically spaced:

==============================================================================
Running compare.py, CPU32NH vs. CPU64NH
Storing results to
  /tmp/pisa_tests/compare_cpu32nh_pipeline_cpu64nh_pipeline
==============================================================================
PISA_FTYPE env var is defined as: "float64";
PISA running in double precision (FP64) mode.
PISA running on CPU+GPU.
[ WARNING] Directory "/tmp/pisa_tests/compare_cpu32nh_pipeline_cpu64nh_pipeline" already exists
[    INFO] Reference map(s) derived from a MapSet stored on disk
Traceback (most recent call last):
  File "./../pisa/scripts/compare.py", line 723, in <module>
    main()
  File "./../pisa/scripts/compare.py", line 719, in main
    compare(**args)
  File "./../pisa/scripts/compare.py", line 341, in compare
    ' or MapSet from test value(s) %s' % test
ValueError: Could not instantiate the test Pipeline, DistributionMaker, Map, or MapSet from test value(s) ['/tmp/pisa_tests/cpu32nh_pipeline/reco__hist__output.json.bz2']

but this will occur anytime we load such binnings saved from disk, and could be an issue with other situations where serialized objects were saved in FP32 and loaded in FP64 (or vice versa).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions