Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12113

Some Dataframe tests are flaky: AttributeError: 'DataFrame' object has no attribute

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage Needed
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: test-failures
    • Labels:

      Description

      Sample error:

      Error Message
      AttributeError: 'DataFrame' object has no attribute 'val'
      Stacktrace
      self = <apache_beam.dataframe.transforms_test.TransformTest testMethod=test_scalar>
      
          def test_scalar(self):
            with expressions.allow_non_parallel_operations():
              a = pd.Series([1, 2, 6])
              self.run_scenario(a, lambda a: a.agg(sum))
              self.run_scenario(a, lambda a: a / a.agg(sum))
          
              # Tests scalar being used as an input to a downstream stage.
              df = pd.DataFrame({'key': ['a', 'a', 'b'], 'val': [1, 2, 6]})
              self.run_scenario(
      >           df, lambda df: df.groupby('key').sum().val / df.val.agg(sum))
      
      apache_beam/dataframe/transforms_test.py:173: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      apache_beam/dataframe/transforms_test.py:76: in run_scenario
          expected = func(input)
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      df =   key  val
      0   a    1
      1   a    2
      2   b    6
      
      >   df, lambda df: df.groupby('key').sum().val / df.val.agg(sum))
      E   AttributeError: 'DataFrame' object has no attribute 'val'
      
      apache_beam/dataframe/transforms_test.py:173: AttributeError
      

      Other tests that failed in the same run (https://ci-beam.apache.org/job/beam_PreCommit_Python_Phrase/2419/):

      apache_beam.dataframe.schemas_test.SchemasTest.test_bytes_proxy_roundtrip
      apache_beam.dataframe.transforms_test.TransformTest.test_groupby_sum_mean

        Attachments

          Activity

            People

            • Assignee:
              bhulette Brian Hulette
              Reporter:
              tvalentyn Valentyn Tymofieiev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: