hydra.overlay.python.dsl.literals module

A DSL for constructing Hydra literal values in Python.

hydra.overlay.python.dsl.literals.bigint(value: int) Literal

Create an arbitrary-precision integer literal.

Example: bigint(9223372036854775808)

hydra.overlay.python.dsl.literals.binary(value: bytes) Literal

Create a binary data literal.

Example: binary(b’x48x65x6Cx6Cx6F’)

hydra.overlay.python.dsl.literals.boolean(value: bool) Literal

Create a boolean literal.

Example: boolean(True)

hydra.overlay.python.dsl.literals.decimal(value: Decimal) Literal

Create a decimal literal (arbitrary-precision exact decimal).

Example: decimal(Decimal(‘1.23’))

hydra.overlay.python.dsl.literals.float32(value: float) Literal

Create a 32-bit floating point literal.

Example: float32(3.14)

hydra.overlay.python.dsl.literals.float64(value: float) Literal

Create a 64-bit floating point literal.

Example: float64(3.14159265359)

hydra.overlay.python.dsl.literals.float_(value: FloatValue) Literal

Create a floating-point literal with specified precision.

Example: float_(FloatValueFloat32(3.14))

hydra.overlay.python.dsl.literals.int16(value: int) Literal

Create a 16-bit signed integer literal.

Example: int16(32767)

hydra.overlay.python.dsl.literals.int32(value: int) Literal

Create a 32-bit signed integer literal.

Example: int32(42)

hydra.overlay.python.dsl.literals.int64(value: int) Literal

Create a 64-bit signed integer literal.

Example: int64(9223372036854775807)

hydra.overlay.python.dsl.literals.int8(value: int) Literal

Create an 8-bit signed integer literal.

Example: int8(127)

hydra.overlay.python.dsl.literals.integer(value: IntegerValue) Literal

Create an integer literal with specified bit width.

Example: integer(IntegerValueInt32(42))

hydra.overlay.python.dsl.literals.string(value: str) Literal

Create a string literal.

Example: string(“hello world”)

hydra.overlay.python.dsl.literals.uint16(value: int) Literal

Create a 16-bit unsigned integer literal.

Example: uint16(65535)

hydra.overlay.python.dsl.literals.uint32(value: int) Literal

Create a 32-bit unsigned integer literal.

Example: uint32(4294967295)

hydra.overlay.python.dsl.literals.uint64(value: int) Literal

Create a 64-bit unsigned integer literal.

Example: uint64(18446744073709551615)

hydra.overlay.python.dsl.literals.uint8(value: int) Literal

Create an 8-bit unsigned integer literal.

Example: uint8(255)