Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mars test #5

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions mars/services/task/supervisor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,27 +599,15 @@ def get_tileable_details(self):
else:
status = SubtaskStatus.running

# get properties for tileable
all_propertes = {}
for slot in tileable.__slots__:
all_propertes.update(getattr(tileable, slot, None))

# Only int/float/string type values for now
displayed_properties = dict()
for property_key, property_value in all_propertes.items():
# Omit key property
if (property_key == 'key'):
continue

if isinstance(property_value, int) or isinstance(property_value, float) \
or isinstance(property_value, str):
displayed_properties[property_key] = property_value
props = {slot: getattr(tileable, slot, None) for slot in tileable.__slots__}
props = {k: v for k, v in props.get('_FIELD_VALUES').items()
if k != 'key' and isinstance(v, (int, float, str))}

tileable_infos[tileable.key] = {
'progress': progress,
'subtaskCount': len(results),
'status': status.value,
'properties': displayed_properties,
'properties': props,
}

return tileable_infos
Expand Down
21 changes: 0 additions & 21 deletions mars/services/task/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,27 +384,6 @@ def _get_fields(details, field, wrapper=None):
details = await task_api.get_tileable_details(task_id)
assert details[r7.key]['status'] == SubtaskStatus.errored.value

def a():
return md.DataFrame([[1, 2], [3, 4]])

def b():
return md.DataFrame([[1, 2, 3, 4], [4, 3, 2, 1]])

def c(a, b):
return a.sum() * a.product() * b.sum() * a.sum() / a.sum() * b.product() / a.product()

ra = mr.spawn(a)
rb = mr.spawn(b)
rc = mr.spawn(c, args=(ra, rb))

graph = TileableGraph([rc.data])
next(TileableGraphBuilder(graph).build())

task_id = await task_api.submit_tileable_graph(graph, fuse_enabled=False)

await asyncio.sleep(1)
details = await task_api.get_tileable_details(task_id)

def is_valid_type(value):
return isinstance(value, int) or isinstance(value, float) or isinstance(value, str)

Expand Down