Skip to content
Snippets Groups Projects
Commit f2ae960f authored by Tom Vander Aa's avatar Tom Vander Aa
Browse files

Merge branch 'master' of code.it4i.cz:ADAS/loom

parents b0eaf333 dd84c7d3
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -14,10 +14,7 @@ loom::PyObj::~PyObj()
{
PyGILState_STATE gstate;
gstate = PyGILState_Ensure();
assert(obj->ob_refcnt > 0);
Py_DecRef(obj);
PyGILState_Release(gstate);
}
......
......@@ -287,3 +287,30 @@ def test_py_task_deserialization3(loom_env):
objs = tuple(tasks.py_value(str(i + 1000)) for i in range(100))
x = tasks.array_make(objs)
loom_env.submit_and_gather(x)
def test_rewrap_test(loom_env):
@tasks.py_task(context=True, n_direct_args=4)
def init(ctx):
content = [1, 2, 3]
return ctx.wrap(content)
@tasks.py_task(context=True)
def center(ctx, train_test):
train, test = [t.unwrap() for t in train_test]
return [ctx.wrap(t) for t in (train, test)]
@tasks.py_task(context=True)
def remove_empty_rows(ctx, train, test):
train = list(train.unwrap())
test = list(test.unwrap())
return [ctx.wrap(t) for t in (train, test)]
train = init()
test = init()
mean_task = center(remove_empty_rows(train, test))
smurff_tasks = [mean_task]
loom_env.start(1)
futures = loom_env.client.submit(smurff_tasks)
results = loom_env.client.gather(futures)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment