pixano_inference.utils.package
Utility functions for working with Python packages.
assert_lance_installed()
Assert that the lance package is installed.
assert_package_installed(package_name, error_message=None)
Assert that a Python package is installed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package_name
|
str
|
The name of the package to check. |
required |
error_message
|
str | None
|
The error message to raise if the package is not installed. |
None
|
Raises:
Type | Description |
---|---|
ImportError
|
If the package is not installed |
Source code in pixano_inference/utils/package.py
assert_sam2_installed()
Assert that the sam2 package is installed.
Source code in pixano_inference/utils/package.py
assert_torch_installed()
Assert that the torch package is installed.
assert_transformers_installed()
Assert that the transformers package is installed.
Source code in pixano_inference/utils/package.py
assert_vllm_installed()
Assert that the vllm package is installed.
is_lance_installed()
Check if the lance package is installed.
Returns:
Type | Description |
---|---|
bool
|
True if the lance package is installed, False otherwise |
is_package_installed(package_name)
is_sam2_installed()
Check if the sam2 package is installed.
Returns:
Type | Description |
---|---|
bool
|
True if the sam2 package is installed, False otherwise |
is_torch_installed()
Check if the torch package is installed.
Returns:
Type | Description |
---|---|
bool
|
True if the torch package is installed, False otherwise |
is_transformers_installed()
Check if the transformers package is installed.
Returns:
Type | Description |
---|---|
bool
|
True if the transformers package is installed, False otherwise |
is_vllm_installed()
Check if the vllm package is installed.
Returns:
Type | Description |
---|---|
bool
|
True if the vLLM package is installed, False otherwise |