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

set device type as CPU #2408

Merged
merged 3 commits into from
Jun 13, 2023
Merged

set device type as CPU #2408

merged 3 commits into from
Jun 13, 2023

Conversation

lxning
Copy link
Collaborator

@lxning lxning commented Jun 10, 2023

Description

Please read our CONTRIBUTING.md prior to creating your first pull request.

Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)
#2394

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Feature/Issue validation/testing

Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test
cat model_store/mnist_scripted_v2/model-config.yaml
# TorchServe frontend parameters
minWorkers: 1
maxWorkers: 1
batchSize: 8
maxBatchDelay: 400
deviceType: "cpu"

torchserve --start --ncs --model-store model_store/ --models mnist_scripted_v2

grep "Number" logs/ts_log.log
Number of GPUs: 4
Number of CPUs: 96

curl "http://localhost:8081/models/mnist_scripted_v2"
[
  {
    "modelName": "mnist_scripted_v2",
    "modelVersion": "2.0",
    "modelUrl": "mnist_scripted_v2",
    "runtime": "python",
    "minWorkers": 1,
    "maxWorkers": 1,
    "batchSize": 8,
    "maxBatchDelay": 400,
    "loadedAtStartup": true,
    "workers": [
      {
        "id": "9000",
        "startTime": "2023-06-10T06:36:41.425Z",
        "status": "READY",
        "memoryUsage": 0,
        "pid": 885315,
        "gpu": false,
        "gpuUsage": "N/A"
      }
    ]
  }
]

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@lxning lxning self-assigned this Jun 10, 2023
@lxning lxning added the bug Something isn't working label Jun 10, 2023
@lxning lxning added this to the v0.8.1 milestone Jun 10, 2023
@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Merging #2408 (8aa6516) into master (8bd76ee) will increase coverage by 2.56%.
The diff coverage is 89.73%.

❗ Current head 8aa6516 differs from pull request most recent head 7ead28f. Consider uploading reports for the commit 7ead28f to get more accurate results

@@            Coverage Diff             @@
##           master    #2408      +/-   ##
==========================================
+ Coverage   69.44%   72.01%   +2.56%     
==========================================
  Files          77       78       +1     
  Lines        3450     3648     +198     
  Branches       57       58       +1     
==========================================
+ Hits         2396     2627     +231     
+ Misses       1051     1017      -34     
- Partials        3        4       +1     
Impacted Files Coverage Δ
ts/arg_parser.py 25.80% <ø> (ø)
ts/model_server.py 0.00% <0.00%> (ø)
ts/model_service_worker.py 63.88% <33.33%> (-0.45%) ⬇️
ts/torch_handler/base_handler.py 55.98% <50.00%> (+0.47%) ⬆️
ts/handler_utils/micro_batching.py 90.90% <90.90%> (ø)
ts/torch_handler/request_envelope/kservev2.py 90.00% <93.75%> (ø)
...l-archiver/model_archiver/model_packaging_utils.py 92.30% <100.00%> (+32.17%) ⬆️
ts/tests/unit_tests/test_micro_batching.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lxning lxning requested a review from namannandan June 12, 2023 16:46
@lxning lxning merged commit 7f9967e into master Jun 13, 2023
12 of 13 checks passed
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
v0.8.1 lifecycle
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants