Пример #1
0
 def _check_serializable_registration(self):
     cur_serializables = get_serializables()
     if len(cur_serializables) == len(self._serializables_snapshot):
         return
     unregistered_set = set(cur_serializables.keys()) - set(self._serializables_snapshot.keys())
     raise AssertionError('Operands %r not registered on initialization'
                          % ([cur_serializables[k] for k in unregistered_set],))
Пример #2
0
    def __init__(self, *args, **kwargs):
        from mars.serialize.core import get_serializables

        super().__init__(*args, **kwargs)
        self._raw_chunk_shapes = dict()
        self._tileable_checked = dict()
        if not hasattr(type(self), '_serializables_snapshot'):
            type(self)._serializables_snapshot = get_serializables()