Change TaskSpec to allow multiple object IDs per argument. (#1204)

* Implement object ID bags

* linting

* fix tests

* fix linting

* fix comments
This commit is contained in:
Philipp Moritz
2017-11-10 16:33:34 -08:00
committed by Robert Nishihara
parent 07f0532b9b
commit e798a652bc
11 changed files with 120 additions and 84 deletions
+3 -2
View File
@@ -260,8 +260,9 @@ class GlobalState(object):
args = []
for i in range(task_spec_message.ArgsLength()):
arg = task_spec_message.Args(i)
if len(arg.ObjectId()) != 0:
args.append(binary_to_object_id(arg.ObjectId()))
if arg.ObjectIdsLength() != 0:
for j in range(arg.ObjectIdsLength()):
args.append(binary_to_object_id(arg.ObjectIds(j)))
else:
args.append(pickle.loads(arg.Data()))
# TODO(atumanov): Instead of hard coding these indices, we should use