Skip to content

run.log_table stores 1-item lists differently #1016

Open
@norman-v

Description

@norman-v

The following code:

run.log_table('test',value={'x':['asd','sdf'],'y':[1,2]})
run.log_table('test1',value={'x':['asd'],'y':[1]})
run.get_metrics()

will yield:
{'test': {'x': ['asd', 'sdf'], 'y': [1, 2]}, 'test1': {'x': 'asd', 'y': 1}}

It shows that single-item lists are stored differently than lists with multiple items.

This makes the JSON produced from these inconsistent types hard to parse down the line (e.g. outside of AML as in PowerBI for example).

If we pass in a list, we would expect that it is stored as a list even if there is only one item in the list.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions