Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-28643

Unclear __repr__ in `ap_association` object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ap_association
    • Labels:
      None

      Description

      When running the Gen 3 pipeline multiple times in the same run (see DM-27325), I get many copies of the following error:

      diaPipe.associator.diaCalculation WARN: Error in ap_HTMIndex.calculate: __init__(): incompatible constructor arguments. The following argument types are supported:
          1. lsst.geom.SpherePoint()
          2. lsst.geom.SpherePoint(longitude: lsst.geom.Angle, latitude: lsst.geom.Angle)
          3. lsst.geom.SpherePoint(longitude: float, latitude: float, units: lsst.geom.AngleUnit)
          4. lsst.geom.SpherePoint(vector: lsst.sphgeom._sphgeom.Vector3d)
          5. lsst.geom.SpherePoint(unitVector: lsst.sphgeom._sphgeom.UnitVector3d)
          6. lsst.geom.SpherePoint(lonLat: lsst.sphgeom._sphgeom.LonLat)
          7. lsst.geom.SpherePoint(other: lsst.geom.SpherePoint)
       
      Invoked with: diaObjectId
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      50809677860045963    2.61725 rad
      Name: ra, dtype: object, diaObjectId
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      50809677860045963    0.0387833 rad
      Name: decl, dtype: object
      

      This error is hard to diagnose because the argument's __repr__ method doesn't even name the type of the object. Please implement a __repr__ that is more consistent with Python conventions.

        Attachments

          Activity

          Hide
          cmorrison Chris Morrison [X] (Inactive) added a comment -

          The error reported shows that a multiple values were input to a function that expects single floats or other single objects.

          Show
          cmorrison Chris Morrison [X] (Inactive) added a comment - The error reported shows that a multiple values were input to a function that expects single floats or other single objects.
          Hide
          krzys Krzysztof Findeisen added a comment - - edited

          Respectfully, the error message generated by pybind11 always reports the repr form of each individual argument to the function/method, and does not group them in any way. In this case, that means that the first argument is

          diaObjectId
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          50809677860045963    2.61725 rad
          Name: ra, dtype: object
          

          I think you said at one point that this is the representation of a Pandas Dataframe, and therefore outside our control. Is that no longer the case?

          Show
          krzys Krzysztof Findeisen added a comment - - edited Respectfully, the error message generated by pybind11 always reports the repr form of each individual argument to the function/method, and does not group them in any way. In this case, that means that the first argument is diaObjectId 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad 50809677860045963 2.61725 rad Name: ra, dtype: object I think you said at one point that this is the representation of a Pandas Dataframe, and therefore outside our control. Is that no longer the case?
          Hide
          cmorrison Chris Morrison [X] (Inactive) added a comment -

          That is correct, it is a Pandas Series object.

          Show
          cmorrison Chris Morrison [X] (Inactive) added a comment - That is correct, it is a Pandas Series object.
          Hide
          krzys Krzysztof Findeisen added a comment -

          Perhaps the issue could simply be closed as Invalid or Won't Fix?

          Show
          krzys Krzysztof Findeisen added a comment - Perhaps the issue could simply be closed as Invalid or Won't Fix?
          Hide
          cmorrison Chris Morrison [X] (Inactive) added a comment -

          Sounds good to me. I'll mark it as "won't fix"

          Show
          cmorrison Chris Morrison [X] (Inactive) added a comment - Sounds good to me. I'll mark it as "won't fix"
          Hide
          cmorrison Chris Morrison [X] (Inactive) added a comment - - edited

          Output shown here is due to the _repr_ definition in Pandas, not within the DM Stack, hence it will not be fixed.

          Further, the error here is triggered by an upstream break in the assumption that DiaObjects are unique in the catalogs processed within ap_association. This issue and safeguards for it are currently being address in DM-28555.

          Show
          cmorrison Chris Morrison [X] (Inactive) added a comment - - edited Output shown here is due to the _ repr _ definition in Pandas, not within the DM Stack, hence it will not be fixed. Further, the error here is triggered by an upstream break in the assumption that DiaObjects are unique in the catalogs processed within ap_association. This issue and safeguards for it are currently being address in DM-28555 .

            People

            Assignee:
            cmorrison Chris Morrison [X] (Inactive)
            Reporter:
            krzys Krzysztof Findeisen
            Watchers:
            Chris Morrison [X] (Inactive), Krzysztof Findeisen, Meredith Rawls
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.