Buckets:
AnonymousSpottedToad/human_verified_bucket / codebase /python /autonomi-ai_nos /nos /common /runtime.py
| import importlib | |
| from typing import Any, Dict, List | |
| from pydantic import BaseModel | |
| def is_package_available(name: str) -> bool: | |
| """Check if a package is available.""" | |
| try: | |
| return importlib.util.find_spec(name) is not None | |
| except ModuleNotFoundError: | |
| return False | |
| def is_torch_tensorrt_available(): | |
| return is_package_available("torch_tensorrt") | |
| def is_torch_neuron_available(): | |
| return is_package_available("torch_neuron") | |
| def is_torch_neuronx_available(): | |
| return is_package_available("torch_neuronx") | |
| class RuntimeEnv(BaseModel): | |
| conda: Dict[str, Any] | |
| """Conda environment specification.""" | |
| def from_packages(cls, packages: List[str]) -> Dict[str, Any]: | |
| return cls(conda={"dependencies": ["pip", {"pip": packages}]}) | |
Xet Storage Details
- Size:
- 805 Bytes
- Xet hash:
- e231b914cfd8c8376239ee70830a4a01e256b77fa04fe040db159f6aed4b6708
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.