Pysyft: Full primitive support in syft 0.3.0

Created on 1 Sep 2020  路  4Comments  路  Source: OpenMined/PySyft

Description

We need extensive support and documentation on how to wrap and use the primitive types properly in a remote context in 0.3.0. I'll describe down below the process of doing this. To be sure that our types are working properly, we will use the interpreter tests on our syft types.

Breakdown

  • [x] syft.lib.python.int.Int

    • [x] subclass: subclass the int primitive and add an id to them.
    • [x] int API available - make all methods that are available for int available for Int as well
    • [x] immutable operators that preserve the ID (eg. __iadd__)
    • [x] get the interpreter tests for int and run them for Int
    • [x] id tests added
    • [x] test unary operators
    • [x] test binary operators against all other types. be sure that they behave like their wrapped type
  • [x] syft.lib.python.float.Float

    • [x] subclass the float primitive and add an uid to the object.
    • [x] float API available - make all methods that are available for float available for Float as well
    • [x] immutable operators that preserve the ID (eg. __iadd__)
    • [x] get the interpreter tests for float and run them for Float
    • [x] id tests added
    • [x] test unary operators
    • [x] test binary operators against all other types. be sure that they behave like their wrapped type
  • [x] syft.lib.python.none.None

    • [x] brainstorming still needed
  • [x] syft.lib.python.string.String

    • [x] subclass the UserStr class and add an uid to the object.
    • [x] str API available - make all methods that are available for str available for String as well
    • [x] immutable operators that preserve the ID (not sure if needed here)
    • [x] get the interpreter tests for str and run them for String
    • [x] test unary operators
    • [x] test binary operators against all our types
  • [x] syft.lib.python.list.List

    • [x] subclass the UserList class and add an uid to the object.
    • [x] list API available - make all methods that are available for list available for List as well
    • [x] immutable operators that preserve the ID (not sure if needed here)
    • [x] get the interpreter tests for list and run them for List
    • [x] test unary operators
    • [x] test binary operators against all our types
  • [x] syft.lib.pyton.dict.Dict

    • [x] subclass the UserDict class and add an uid to the object.
    • [x] dict API available - make all methods that are available for dict available for Dict as well
    • [x] immutable operators that preserve the ID (not sure if needed here)
    • [x] get the interpreter tests for dict and run them for Dict
    • [x] test unary operators
    • [x] test binary operators against all our types
  • [x] Pointers:

    • [x] generate pointers (and proper serde) for all the classes defined above.
    • [x] test them in a remote context.
  • [ ] Test our types against torch and numpy as well. Except of None and bool there should be no difference.

  • [x] Profit.

Help Wanted Priority Severity Type syft 0.3

Most helpful comment

will be working on dict @tudorcebere :)

All 4 comments

Picking up String

will be working on dict @tudorcebere :)

We merged one of the String PRs.
I think we still need to work on/test if they work:

  • test unary operators
  • test binary operators against all our types (for the moment we made sure that some of the strings methods like len returns an Int from Syft, rather than an int from Python) -- We need to do this when we add full support for all the other types

Any help still needed on this @gmuraru @tudorcebere @madhavajay ?

Is support to String and StringPointer done @gmuraru ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tblazina picture tblazina  路  3Comments

wentaiwu92 picture wentaiwu92  路  4Comments

iamtrask picture iamtrask  路  3Comments

swaroopch picture swaroopch  路  4Comments

jvmncs picture jvmncs  路  3Comments