# `Vllm.CollectEnv`
[🔗](https://github.com/nshkrdotcom/vllm/blob/v0.3.0/lib/snakebridge_generated/vllm/collect_env/__init__.ex#L6)

Submodule bindings for `vllm.collect_env`.

## Version

- Requested: 0.14.0
- Observed at generation: 0.14.0

## Runtime Options

All functions accept a `__runtime__` option for controlling execution behavior:

    Vllm.CollectEnv.some_function(args, __runtime__: [timeout: 120_000])

### Supported runtime options

- `:timeout` - Call timeout in milliseconds (default: 120,000ms / 2 minutes)
- `:timeout_profile` - Use a named profile (`:default`, `:ml_inference`, `:batch_job`, `:streaming`)
- `:stream_timeout` - Timeout for streaming operations (default: 1,800,000ms / 30 minutes)
- `:session_id` - Override the session ID for this call
- `:pool_name` - Target a specific Snakepit pool (multi-pool setups)
- `:affinity` - Override session affinity (`:hint`, `:strict_queue`, `:strict_fail_fast`)

### Timeout Profiles

- `:default` - 2 minute timeout for regular calls
- `:ml_inference` - 10 minute timeout for ML/LLM workloads
- `:batch_job` - Unlimited timeout for long-running jobs
- `:streaming` - 2 minute timeout, 30 minute stream_timeout

### Example with timeout override

    # For a long-running ML inference call
    Vllm.CollectEnv.predict(data, __runtime__: [timeout_profile: :ml_inference])

    # Or explicit timeout
    Vllm.CollectEnv.predict(data, __runtime__: [timeout: 600_000])

    # Route to a pool and enforce strict affinity
    Vllm.CollectEnv.predict(data, __runtime__: [pool_name: :strict_pool, affinity: :strict_queue])

See `SnakeBridge.Defaults` for global timeout configuration.

# `check_release_file`

```elixir
@spec check_release_file(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.check_release_file`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `default_conda_patterns`

```elixir
@spec default_conda_patterns() ::
  {:ok, MapSet.t(term())} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.collect_env.DEFAULT_CONDA_PATTERNS`.

## Returns

- `MapSet.t(term())`

# `default_pip_patterns`

```elixir
@spec default_pip_patterns() :: {:ok, MapSet.t(term())} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.collect_env.DEFAULT_PIP_PATTERNS`.

## Returns

- `MapSet.t(term())`

# `env_info_fmt`

```elixir
@spec env_info_fmt() :: {:ok, String.t()} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.collect_env.env_info_fmt`.

## Returns

- `String.t()`

# `environment_variables`

```elixir
@spec environment_variables() ::
  {:ok, %{optional(term()) =&gt; term()}} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.collect_env.environment_variables`.

## Returns

- `%{optional(term()) => term()}`

# `get_cachingallocator_config`

```elixir
@spec get_cachingallocator_config(keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_cachingallocator_config`.

## Returns

- `term()`

# `get_clang_version`

```elixir
@spec get_clang_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_clang_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_cmake_version`

```elixir
@spec get_cmake_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_cmake_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_conda_packages`

```elixir
@spec get_conda_packages(term()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_conda_packages`.

## Parameters

- `run_lambda` (term())
- `patterns` (term() default: None)

## Returns

- `term()`

# `get_conda_packages`

```elixir
@spec get_conda_packages(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec get_conda_packages(term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `get_conda_packages`

```elixir
@spec get_conda_packages(term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `get_cpu_info`

```elixir
@spec get_cpu_info(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_cpu_info`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_cuda_module_loading_config`

```elixir
@spec get_cuda_module_loading_config(keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_cuda_module_loading_config`.

## Returns

- `term()`

# `get_cudnn_version`

```elixir
@spec get_cudnn_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Return a list of libcudnn.so; it's hard to tell which one is being used.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_env_info`

```elixir
@spec get_env_info(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_env_info`.

## Returns

- `term()`

# `get_env_vars`

```elixir
@spec get_env_vars(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_env_vars`.

## Returns

- `term()`

# `get_gcc_version`

```elixir
@spec get_gcc_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_gcc_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_gpu_info`

```elixir
@spec get_gpu_info(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_gpu_info`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_gpu_topo`

```elixir
@spec get_gpu_topo(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_gpu_topo`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_libc_version`

```elixir
@spec get_libc_version(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_libc_version`.

## Returns

- `term()`

# `get_lsb_version`

```elixir
@spec get_lsb_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_lsb_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_mac_version`

```elixir
@spec get_mac_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_mac_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_nvidia_driver_version`

```elixir
@spec get_nvidia_driver_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_nvidia_driver_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_nvidia_smi`

```elixir
@spec get_nvidia_smi(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_nvidia_smi`.

## Returns

- `term()`

# `get_os`

```elixir
@spec get_os(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_os`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_pip_packages`

```elixir
@spec get_pip_packages(term()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Return `pip list` output. Note: will also find conda-installed pytorch and numpy packages.

## Parameters

- `run_lambda` (term())
- `patterns` (term() default: None)

## Returns

- `term()`

# `get_pip_packages`

```elixir
@spec get_pip_packages(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec get_pip_packages(term(), term()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `get_pip_packages`

```elixir
@spec get_pip_packages(term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `get_platform`

```elixir
@spec get_platform(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_platform`.

## Returns

- `term()`

# `get_pretty_env_info`

```elixir
@spec get_pretty_env_info(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_pretty_env_info`.

## Returns

- `term()`

# `get_python_platform`

```elixir
@spec get_python_platform(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_python_platform`.

## Returns

- `term()`

# `get_rocm_version`

```elixir
@spec get_rocm_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Returns the ROCm version if available, otherwise 'N/A'.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_running_cuda_version`

```elixir
@spec get_running_cuda_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_running_cuda_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `get_vllm_version`

```elixir
@spec get_vllm_version(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_vllm_version`.

## Returns

- `term()`

# `get_windows_version`

```elixir
@spec get_windows_version(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.get_windows_version`.

## Parameters

- `run_lambda` (term())

## Returns

- `term()`

# `is_uv_venv`

```elixir
@spec is_uv_venv(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.is_uv_venv`.

## Returns

- `term()`

# `is_xnnpack_available`

```elixir
@spec is_xnnpack_available(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.is_xnnpack_available`.

## Returns

- `term()`

# `main`

```elixir
@spec main(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.main`.

## Returns

- `term()`

# `pretty_str`

```elixir
@spec pretty_str(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.pretty_str`.

## Parameters

- `envinfo` (term())

## Returns

- `term()`

# `run`

```elixir
@spec run(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Return (return-code, stdout, stderr).

## Parameters

- `command` (term())

## Returns

- `term()`

# `run_and_parse_first_match`

```elixir
@spec run_and_parse_first_match(term(), term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Run command using run_lambda, returns the first regex match if it exists.

## Parameters

- `run_lambda` (term())
- `command` (term())
- `regex` (term())

## Returns

- `term()`

# `run_and_read_all`

```elixir
@spec run_and_read_all(term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Run command using run_lambda; reads and returns entire output if rc is 0.

## Parameters

- `run_lambda` (term())
- `command` (term())

## Returns

- `term()`

# `run_and_return_first_line`

```elixir
@spec run_and_return_first_line(term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Run command using run_lambda and returns first line if output is not empty.

## Parameters

- `run_lambda` (term())
- `command` (term())

## Returns

- `term()`

# `summarize_vllm_build_flags`

```elixir
@spec summarize_vllm_build_flags(keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python binding for `vllm.collect_env.summarize_vllm_build_flags`.

## Returns

- `term()`

# `torch_available`

```elixir
@spec torch_available() :: {:ok, boolean()} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.collect_env.TORCH_AVAILABLE`.

## Returns

- `boolean()`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
