Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-3097

Tutorial simple-aggregation-example does not work

    XMLWordPrintableJSON

Details

    Description

      I am using systemds, commit 59267c983bc7632f7c779618f4824114dd6ff4e4. I tried to run the "Simple Aggregation Example" tutorial from docs/source/guide/federated.rst or from https://apache.github.io/systemds/api/python/guide/federated.html#simple-aggregation-example but it failed.

      Traceback (most recent call last):
      [...]
      fed_a = sds.federated(sds, [address], [dims])
      File "/home/martin/anaconda3/envs/systemds/lib/python3.9/site-packages/systemds-2.2.0-py3.9.egg/systemds/context/systemds_context.py", line 440, in federated
      ','.join(map(lambda s: f'"{s}"', addresses)) + ')'
      TypeError: 'SystemDSContext' object is not iterable

       

      I applied following change:

      fed_a = sds.federated(sds, [address], [dims])

      fed_a = sds.federated([address], [dims])

       

      Now, the script runs through and shows the result "39". This is not the expected value of 45. It seems the first row of "temp/test.csv" is not included. As a quick-fix, one could add an empty first row to the csv-file:

      np.savetxt("temp/test.csv", a, delimiter=",")

      np.savetxt("temp/test.csv", a, delimiter=",", header=' ')

      Attachments

        Activity

          People

            Unassigned Unassigned
            martin_volk Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: