neulab / explainaboard_web

MIT License
8 stars 2 forks source link

SystemModel.get_system_info() returns different types and SystemOutputInfo doesn't have to_dict() #533

Open qjiang002 opened 1 year ago

qjiang002 commented 1 year ago

This issue may be related to PR #526

To reproduce the error, start a local server and go to 'sst2 Test Benchmark'. The page will continue loading and the error shows in the terminal.

SystemModel.get_system_info() returns different types

system.get_system_info() will return both dict and SystemOutputInfo, although the function definition says to return SystemOutputInfo. I'm not sure if the error is due to serialization or due to duplicate system names.

In addition, after I changed the system names to be distinct, the same error still occurs as the system names are not changed when retrieving these systems.

Here is the printed info.

[0] number of systems,  10
[0] get_system_info returns,  <class 'dict'> system_name:  test_sst2_0916
[0] get_system_info returns,  <class 'dict'> system_name:  test_cloud_storage
[0] get_system_info returns,  <class 'dict'> system_name:  sst_test3
[0] get_system_info returns,  <class 'dict'> system_name:  sst_test1
[0] get_system_info returns,  <class 'dict'> system_name:  test_cloud_storage2
[0] get_system_info returns,  <class 'explainaboard.info.SysOutputInfo'> system_name:  sst2-lstm
[0] get_system_info returns,  <class 'explainaboard.info.SysOutputInfo'> system_name:  sst2-lstm-1
[0] get_system_info returns,  <class 'explainaboard.info.SysOutputInfo'> system_name:  sst2-lstm
[0] get_system_info returns,  <class 'dict'> system_name:  sst2-lstm
[0] get_system_info returns,  <class 'dict'> system_name:  sst2-lstm-2

SystemOutputInfo doesn't have to_dict().

When I try to call SystemOutputInfo.to_dict(), it gives this error: AttributeError: 'SysOutputInfo' object has no attribute 'to_dict'.