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

Submodule bindings for `vllm.platforms`.

## Version

- Requested: 0.14.0
- Observed at generation: 0.14.0

## Runtime Options

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

    Vllm.Platforms.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.Platforms.predict(data, __runtime__: [timeout_profile: :ml_inference])

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

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

See `SnakeBridge.Defaults` for global timeout configuration.

# `__all__`

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

Python module attribute `vllm.platforms.__all__`.

## Returns

- `list(term())`

# `__getattr__`

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

Python binding for `vllm.platforms.__getattr__`.

## Parameters

- `name` (String.t())

## Returns

- `term()`

# `__setattr__`

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

Python binding for `vllm.platforms.__setattr__`.

## Parameters

- `name` (String.t())
- `value` (term())

## Returns

- `term()`

# `_current_platform`

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

Python binding for `vllm.platforms._current_platform`.

## Returns

- `term()`

# `_init_trace`

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

Python module attribute `vllm.platforms._init_trace`.

## Returns

- `String.t()`

# `builtin_platform_plugins`

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

Python module attribute `vllm.platforms.builtin_platform_plugins`.

## Returns

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

# `cpu_platform_plugin`

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

Python binding for `vllm.platforms.cpu_platform_plugin`.

## Returns

- `term()`

# `cuda_platform_plugin`

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

Python binding for `vllm.platforms.cuda_platform_plugin`.

## Returns

- `term()`

# `current_platform`

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

Python module attribute `vllm.platforms.current_platform`.

## Returns

- `term()`

# `load_plugins_by_group`

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

Python binding for `vllm.platforms.load_plugins_by_group`.

## Parameters

- `group` (String.t())

## Returns

- `%{optional(String.t()) => term()}`

# `logger`

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

Python module attribute `vllm.platforms.logger`.

## Returns

- `term()`

# `platform_plugins_group`

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

Python module attribute `vllm.platforms.PLATFORM_PLUGINS_GROUP`.

## Returns

- `String.t()`

# `resolve_current_platform_cls_qualname`

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

Python binding for `vllm.platforms.resolve_current_platform_cls_qualname`.

## Returns

- `String.t()`

# `resolve_obj_by_qualname`

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

Resolve an object by its fully-qualified class name.

## Parameters

- `qualname` (String.t())

## Returns

- `term()`

# `rocm_platform_plugin`

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

Python binding for `vllm.platforms.rocm_platform_plugin`.

## Returns

- `term()`

# `supports_xccl`

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

Python binding for `vllm.platforms.supports_xccl`.

## Returns

- `boolean()`

# `tpu_platform_plugin`

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

Python binding for `vllm.platforms.tpu_platform_plugin`.

## Returns

- `term()`

# `vllm_version_matches_substr`

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

Check to see if the vLLM version matches a substring.

## Parameters

- `substr` (String.t())

## Returns

- `boolean()`

# `xpu_platform_plugin`

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

Python binding for `vllm.platforms.xpu_platform_plugin`.

## Returns

- `term()`

---

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