Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving html <br> tags instead of \n in response #227

Open
dagardner-nv opened this issue Aug 4, 2023 · 4 comments
Open

Receiving html <br> tags instead of \n in response #227

dagardner-nv opened this issue Aug 4, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dagardner-nv
Copy link

Describe the bug
This is occurring with 0.14

To Reproduce
Steps to reproduce the behavior:

  1. Mock File Content
    (https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/tests/mock_triton_server/mocks/v2/models/abp-nvsmi-xgb/config/GET.mock)
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1400

{"name":"abp-nvsmi-xgb","platform":"","backend":"fil","version_policy":{"latest":{"num_versions":1}},"max_batch_size":32768,"input":[{"name":"input__0","data_type":"TYPE_FP32","format":"FORMAT_NONE","dims":[29],"is_shape_tensor":false,"allow_ragged_batch":false}],"output":[{"name":"output__0","data_type":"TYPE_FP32","dims":[1],"label_filename":"","is_shape_tensor":false}],"batch_input":[],"batch_output":[],"optimization":{"priority":"PRIORITY_DEFAULT","input_pinned_memory":{"enable":true},"output_pinned_memory":{"enable":true},"gather_kernel_buffer_threshold":0,"eager_batching":false},"dynamic_batching":{"preferred_batch_size":[1,4,8,12,16,20,24,28,32,64,128,256,512,1024,2048,4096,8192,16384,32768],"max_queue_delay_microseconds":50000,"preserve_ordering":false,"priority_levels":0,"default_priority_level":0,"priority_queue_policy":{}},"instance_group":[{"name":"abp-nvsmi-xgb_0","kind":"KIND_GPU","count":1,"gpus":[0,1,2,3,4,5,6,7],"secondary_devices":[],"profile":[],"passive":false,"host_policy":""}],"default_model_filename":"abp-nvsmi-xgb.bst","cc_model_filenames":{},"metric_tags":{},"parameters":{"storage_type":{"string_value":"AUTO"},"model_type":{"string_value":"xgboost"},"predict_proba":{"string_value":"false"},"threshold":{"string_value":"0.5"},"algo":{"string_value":"ALGO_AUTO"},"output_class":{"string_value":"true"},"blocks_per_sm":{"string_value":"0"}},"model_warmup":[]}
  1. Folder Structure mocks/v2/models/abp-nvsmi-xgb/config/GET.mock
  2. Error Stack Trace
$ curl "http://localhost:8000/v2/models/abp-nvsmi-xgb/config"
<br/><br/>{"name":"abp-nvsmi-xgb","platform":"","backend":"fil","version_policy":{"latest":{"num_versions":1}},"max_batch_size":32768,"input":[{"name":"input__0","data_type":"TYPE_FP32","format":"FORMAT_NONE","dims":[29],"is_shape_tensor":false,"allow_ragged_batch":false}],"output":[{"name":"output__0","data_type":"TYPE_FP32","dims":[1],"label_filename":"","is_shape_tensor":false}],"batch_input":[],"batch_output":[],"optimization":{"priority":"PRIORITY_DEFAULT","input_pinned_memory":{"enable":true},"output_pinned_memory":{"enable":true},"gather_kernel_buffer_threshold":0,"eager_batching":false},"dynamic_batching":{"preferred_batch_size":[1,4,8,12,16,20,24,28,32,64,128,256,512,1024,2048,4096,8192,16384,32768],"max_queue_delay_microseconds":50000,"preserve_ordering":false,"priority_levels":0,"default_priority_level":0,"priority_queue_policy":{}},"instance_group":[{"name":"abp-nvsmi-xgb_0","kind":"KIND_GPU","count":1,"gpus":[0,1,2,3,4,5,6,7],"secondary_devices":[],"profile":[],"passive":false,"host_policy":""}],"default_model_filename":"abp-nvsmi-xgb.bst","cc_model_filenames":{},"metric_tags":{},"parameters":{"storage_type":{"string_value":"AUTO"},"model_type":{"string_value":"xgboost"},"predict_proba":{"string_value":"false"},"threshold":{"string_value":"0.5"},"algo":{"string_value":"ALGO_AUTO"},"output_class":{"string_value":"true"},"blocks_per_sm":{"string_value":"0"}},"model_warmup":[]}

Expected behavior
Return just the json content, not the <br> tags causing json parse errors

Desktop (please complete the following information):

  • OS: Debian Bullseye
  • Browser curl
  • Version 8.1.2

Additional context
Attach camouflage.log file

2023-08-04 08:55:22 info: [1568244] Worker started 
2023-08-04 08:55:22 info: Handlebar helpers registration started 
2023-08-04 08:55:22 warn: Code Injection is enabled. 
2023-08-04 08:55:22 info: Handlebar helpers registration completed 
2023-08-04 08:55:22 info: No middleware injection. 
(node:1568244) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
2023-08-04 08:55:22 info: Worker sharing HTTP server at http://localhost:8000 ⛳ 
2023-08-04 08:55:24 warn: Validation is disabled. Request and responses are not validated. 
2023-08-04 08:55:24 debug: Using new line as \n 
2023-08-04 08:55:24 debug: Response Status set to 200 
2023-08-04 08:55:24 debug: Headers Set Content-Type:  application/json 
2023-08-04 08:55:24 debug: Headers Set Content-Length:  1400 
2023-08-04 08:55:24 debug: Generated Response <br/><br/>{"name":"abp-nvsmi-xgb","platform":"","backend":"fil","version_policy":{"latest":{"num_versions":1}},"max_batch_size":32768,"input":[{"name":"input__0","data_type":"TYPE_FP32","format":"FORMAT_NONE","dims":[29],"is_shape_tensor":false,"allow_ragged_batch":false}],"output":[{"name":"output__0","data_type":"TYPE_FP32","dims":[1],"label_filename":"","is_shape_tensor":false}],"batch_input":[],"batch_output":[],"optimization":{"priority":"PRIORITY_DEFAULT","input_pinned_memory":{"enable":true},"output_pinned_memory":{"enable":true},"gather_kernel_buffer_threshold":0,"eager_batching":false},"dynamic_batching":{"preferred_batch_size":[1,4,8,12,16,20,24,28,32,64,128,256,512,1024,2048,4096,8192,16384,32768],"max_queue_delay_microseconds":50000,"preserve_ordering":false,"priority_levels":0,"default_priority_level":0,"priority_queue_policy":{}},"instance_group":[{"name":"abp-nvsmi-xgb_0","kind":"KIND_GPU","count":1,"gpus":[0,1,2,3,4,5,6,7],"secondary_devices":[],"profile":[],"passive":false,"host_policy":""}],"default_model_filename":"abp-nvsmi-xgb.bst","cc_model_filenames":{},"metric_tags":{},"parameters":{"storage_type":{"string_value":"AUTO"},"model_type":{"string_value":"xgboost"},"predict_proba":{"string_value":"false"},"threshold":{"string_value":"0.5"},"algo":{"string_value":"ALGO_AUTO"},"output_class":{"string_value":"true"},"blocks_per_sm":{"string_value":"0"}},"model_warmup":[]} 
2023-08-04 08:55:24 debug: HTTP GET /v2/models/abp-nvsmi-xgb/config :: Query Parameters: {} | Request Headers {"host":"localhost:8000","user-agent":"curl/8.1.2","accept":"*/*"} | Request Body {} 
@dagardner-nv dagardner-nv added the bug Something isn't working label Aug 4, 2023
shubhendumadhukar added a commit that referenced this issue Aug 4, 2023
fix: fix bug caused by preserve new line feat #227
@shubhendumadhukar
Copy link
Contributor

should work now in 0.14.1

@dagardner-nv
Copy link
Author

Awesome! Thanks for the quick response!

@dagardner-nv
Copy link
Author

dagardner-nv commented Sep 13, 2023

Confirmed, working in 0.14.2 (and 0.15)

@dagardner-nv dagardner-nv changed the title Receiving html <br> tages instead of \n in response Receiving html <br> tags instead of \n in response Sep 13, 2023
rapids-bot bot pushed a commit to nv-morpheus/Morpheus that referenced this issue Sep 18, 2023
…1195)

* Adopt camouflage-server 0.15, previously we've been locked on v0.9 due to outstanding bugs introduced in versions 0.10 - 0.14.1 :
  - testinggospels/camouflage#203
  - testinggospels/camouflage#223  
  - testinggospels/camouflage#227
  - testinggospels/camouflage#229
* Includes unrelated fix to running CI locally
* Restrict mlflow to versions prior to 2.7

closes #967
Fixes #1192

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Christopher Harris (https://github.com/cwharris)

URL: #1195
@dagardner-nv
Copy link
Author

This should be good to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants