unify_inputs('this is a test')
# test legacy multimodal input
unify_inputs({'text': 'this is a test',
'image': np.array([1, 2, 3]), 'class': 0})
from m3tl.test_base import TestBase
from m3tl.utils import load_transformer_tokenizer
from m3tl.predefined_problems import generate_fake_data
tb = TestBase()
params = tb.params
problem = 'weibo_fake_ner'
modal_name = 'desc'
modal_inputs = 'this is a test'
target = None
tokenizer = load_transformer_tokenizer(
tokenizer_name=params.transformer_tokenizer_name, load_module_name=params.transformer_tokenizer_loading)
print(text_modal_input_handling(
problem=problem, modal_name=modal_name, modal_inputs=modal_inputs, tokenizer=tokenizer, params=params))
fake_data = generate_fake_data('dict')
print(category_modal_input_handling(
problem=problem, modal_name='inputs_cate', modal_inputs=fake_data[0]['inputs_cate'], tokenizer=tokenizer, params=params, raw_inputs=fake_data[0]))