CRZbulabula opened a new pull request, #17766:
URL: https://github.com/apache/iotdb/pull/17766

   ## Description
   
   ### Fix inference output type
   
   DataNode declares CALL INFERENCE output schema as DOUBLE, but AINode 
serialized model tensors using their original dtype. For float32 outputs such 
as chronos2, this produced a FLOAT TsBlock column and clients calling 
getDouble() failed.
   
   This PR converts inference outputs to torch.float64 before TsBlock 
serialization so the physical TsBlock column matches the DOUBLE result schema.
   
   ### Tests
   
   - Added coverage in AINodeSharedClusterIT to assert the output metadata type 
is DOUBLE and actually read values with ResultSet#getDouble("output").
   - Verified AINode serde converts the manager output path to DOUBLE.
   - Ran black .
   - Ran isort --profile black .
   - Ran mvn spotless:apply -pl integration-test -P with-integration-tests
   - Ran mvn -pl integration-test -P with-integration-tests test-compile
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added integration tests.
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) 
in this PR
   
   - iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
   - 
integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeSharedClusterIT.java


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to