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

Fix missing system metrics for Apple M1 #3376

Closed
jakki-amd opened this issue Dec 20, 2024 · 0 comments · Fixed by #3377
Closed

Fix missing system metrics for Apple M1 #3376

jakki-amd opened this issue Dec 20, 2024 · 0 comments · Fixed by #3377

Comments

@jakki-amd
Copy link
Contributor

jakki-amd commented Dec 20, 2024

🐛 Describe the bug

Apple devices currently don't produce any system metrics in ts/systym_metrics.py. Add support for torch.mps system metrics that allows Apple devices also to produce system metrics.

Error logs

Traceback (most recent call last):
      File "/Users/user/serve/ts/metrics/metric_collector.py", line 20, in <module>
        system_metrics.collect_all(sys.modules["ts.metrics.system_metrics"], arguments.gpu)
      File "/Users/user/serve/ts/metrics/system_metrics.py", line 125, in collect_all
        value(num_of_gpus)
      File "/Users/user/serve/ts/metrics/system_metrics.py", line 99, in collect_gpu_metrics
        gpu_mem_utilization,
    UnboundLocalError: local variable 'gpu_mem_utilization' referenced before assignment

Installation instructions

No and no.

Model Packaging

Not relevant.

config.properties

No response

Versions

------------------------------------------------------------------------------------------
Environment headers
------------------------------------------------------------------------------------------
Torchserve branch: 
torchserve==0.12.0b20241219
torch-model-archiver==0.12.0b20241219
Python version: 3.10 (64-bit runtime)
Python executable: /Users/user/venv/bin/python3.10
Versions of relevant python libraries:
captum==0.6.0
numpy==1.24.3
pillow==11.0.0
psutil==6.1.0
pygit2==1.13.3
pylint==3.0.3
pytest==7.3.1
pytest-cov==4.1.0
pytest-mock==3.14.0
pytest-timeout==2.3.1
requests==2.32.0
requests-toolbelt==1.0.0
torch==2.4.0
torch-model-archiver==0.12.0b20241219
torch-workflow-archiver==0.2.15b20241219
torchaudio==2.4.0
torchpippy==0.1.1
torchserve==0.12.0b20241219
torchvision==0.19.0
transformers==4.47.1
wheel==0.45.1
torch==2.4.0
**Warning: torchtext not present ..
torchvision==0.19.0
torchaudio==2.4.0
Java Version:
OS: Mac OSX 14.5 (arm64)
GCC version: N/A
Clang version: 14.0.3 (clang-1403.0.22.14.1)
CMake version: N/A
Versions of npm installed packages:
markdown-link-check@3.13.6
newman-reporter-html@1.0.5
newman@5.3.2
Environment:
library_path (LD_/DYLD_): 

Repro instructions

./frontend/gradlew -p frontend clean build

on Mac with M1

Possible Solution

Add torch.mps support on ts.system_metrics.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant