config
Environment-variable configuration of cache, model, and data directories and randomness defaults.
This module contains the following global variables for configuration:
| Variable | Description | Default |
|---|---|---|
HOME_DIR |
The home directory of the user. | Path.home().as_posix() |
CACHE_DIR |
The cache directory for the package. | Path(HOME_DIR, ".cache", "torch-pointcloud").as_posix() |
MODELS_DIR |
The directory for the models. | Path(CACHE_DIR, "models").as_posix() |
DATA_DIR |
The directory for the data. | "data" |
RANDOM_SEED |
The random seed for the package. | None |
FPS_RANDOM_START |
Whether to start the random seed from the current time. | None |
KNN_DENSE_BUDGET |
The dense budget for the KNN. | 16_000_000 |
Functions:
-
asbool–Parse an environment variable as a boolean.
-
asint–Parse an environment variable as an integer.
asbool
¶
Parse an environment variable as a boolean.
Parameters:
-
value(Optional[str]) –The raw variable value, or None when it is unset.
Returns:
-
Optional[bool]–True when the value reads as
true,1,yesory(case-insensitive), False for anything -
Optional[bool]–else, and None when the variable is unset.
asint
¶
Parse an environment variable as an integer.
Parameters:
-
value(Optional[str]) –The raw variable value, or None when it is unset.
Returns:
-
Optional[int]–The parsed integer, or None when the variable is unset or does not parse.