@@ -322,7 +322,7 @@ def test_v4_onnx_model(self):
322322 def test_v4_tensor (self ):
323323 key_name = "tensor{1}"
324324 con = get_connection (self .env , key_name )
325- tensor_rdb = b" \a \x81 \x00 \x8f \xd3 \x10 \xd4 \x8e D\x04 \x02 \x00 \x02 \x02 \x02 \x02 \x02 \x02 \x01 \x05 \b \x01 \x00 \x00 \x00 \x02 \x00 \x00 \x00 \x00 \t \x00 Viy\xab 4\xbe \xdd \x82 "
325+ tensor_rdb = b' \x07 \x81 \x00 \x8f \xd3 \x10 \xd4 \x8e D\x04 \x02 \x00 \x02 \x02 \x02 \x02 \x02 \x02 \x01 \x05 \x08 \x01 \x00 \x00 \x00 \x02 \x00 \x00 \x00 \x00 \t \x00 Viy\xab 4\xbe \xdd \x82 '
326326 self .env .assertEqual (con .execute_command ('FLUSHALL' ), True )
327327 con .restore (key_name , 0 , tensor_rdb , True )
328328 _ , tensor_type , _ , tensor_shape = con .execute_command ('AI.TENSORGET' , key_name , 'META' )
@@ -331,7 +331,7 @@ def test_v4_tensor(self):
331331 self .env .assertEqual (values , [1 , 2 ])
332332
333333 # test RDB load of string tensor
334- str_tensor_rdb = b" \a \x81 \x00 \x8f \xd3 \x10 \xd4 \x8e D\x04 \x02 \a \x02 \b \x02 \x01 \x02 \x02 \x05 \x12 str_val1\x00 str_val2\x00 \x00 \t \x00 \xf9 ; \xe0 \xd1 2. \x06 z"
334+ str_tensor_rdb = b' \x07 \x81 \x00 \x8f \xd3 \x10 \xd4 \x8e D\x04 \x02 \x07 \x02 \x08 \x02 \x01 \x02 \x02 \x05 \x12 str_val1\x00 str_val2\x00 \x02 \ x00\x02 \ t\x00 \t \x00 \x8b \x05 Z \x0f : \x87 7O'
335335 con .restore ('string_tensor{1}' , 0 , str_tensor_rdb , True )
336336 _ , tensor_type , _ , tensor_shape = con .execute_command ('AI.TENSORGET' , 'string_tensor{1}' , 'META' )
337337 self .env .assertEqual ([tensor_type , tensor_shape ], [b"STRING" , [2 ]])
0 commit comments