Skip to content

Conversation

@Boyuan-Deng
Copy link
Collaborator

@Boyuan-Deng Boyuan-Deng commented May 18, 2022

This PR:

  • originally, the input & output IOPointer in componentRun retrieved from history class are storing a hash value of the value
  • now, the original input & output is stored as a original-content field of the input & output IOPointer

Test:

run python examples/io_pointer_load_test.py under mltrace directory, you should expect to see no difference in dataframe

@Boyuan-Deng Boyuan-Deng requested a review from shreyashankar May 18, 2022 07:27
inputs = []
for iop in cr.inputs:
iop_dict = IOPointer.from_dictionary(iop.__dict__).to_dictionary()
iop_dict['original_content'] = _load(iop_dict['name'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we cannot load the name? wrap this in a try-catch

if 'value' in inp.keys():
del inp['value']
if inp['original-content'] is not None:
inp['original-content'] = inp['original-content'].to_json()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested that this works for numpy arrays too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants