docs(examples): aLora/102_example.py fails with AloraActivationError (stembolts io.yaml has no instruction)

Abierto
#1,790 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, yaml
Área
ai, documentation

Línea de trabajo

Start with docs/examples/aLora/io.yaml and docs/examples/aLora/README.md; compare the custom adapter flow with a catalog adapter that declares an instruction: field. The issue reports that adding the specified invocation sequence makes docs/examples/aLora/102_example.py run; verify the example with the provided command and ensure the README train and upload flow produces an activatable adapter. The issue also raises broader training and upload behavior questions, so confirm the intended scope before changing those paths.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/adapter-functions bug documentation

Following the aLoRA README, docs/examples/aLora/102_example.py fails on main with:

AloraActivationError: aLoRA 'stembolts' (base model 'granite-3.3-2b-instruct', qualified
name 'stembolts_alora') never activates for this call: its declared invocation sequence
(49152, 1553, 81, 34775, 49153) is absent from the assembled prompt

The example is skip-marked, so CI never runs it. It is the only example of a custom, non-catalog aLoRA adapter, and docs/examples/aLora/README.md currently describes stembolts_intrinsic.py (the helper it drives) as a runnable version.

Cause

The stembolts io.yaml has no instruction: field. The aLoRA's alora_invocation_tokens decode to <|start_of_role|>check_requirement<|end_of_role|>, which therefore never reaches the prompt, so the activation guard added in #1684 correctly refuses to run it. Catalog adapters get the sequence from an instruction: field in their io.yaml (for example requirement-check).

docs/examples/aLora/io.yaml is byte-identical to the one on nfulton/stembolts, and m alora train defaults its invocation prompt to the same <|start_of_role|>check_requirement<|end_of_role|>. So the README's own train and upload flow produces an adapter that cannot activate.

Evidence

With this added to a copy of the cached io.yaml:

instruction: |-
  <|start_of_role|>check_requirement<|end_of_role|>

the example runs and returns {"defective_part": "Piston Rings", "diag_likelihood": 0.9, ...}. Without it, the error above, identically at the PR #1765 head and on current main (972fa646c).

Reproduce (needs uv sync --extra hf):

printf 'The engine sputters at high RPM after sitting overnight.\nOil seepage around the piston rings.\n' \
  | uv run python docs/examples/aLora/102_example.py

To decide

  • Add the instruction: field to docs/examples/aLora/io.yaml and the README flow.
  • Update nfulton/stembolts on Hugging Face (not something a PR here can change).
  • Whether m alora train or m alora upload --io-yaml should add the field automatically, so users training their own adapter don't hit this.
  • Whether the example should be un-skipped or covered by a test once it works.

Found while reviewing #1765.

Lenguaje dominante
Python
Estrellas
1.8k
Forks
161
Merge medio
4 d 3 h
PR fusionados (30 d)
45

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de generative-computing/mellea

Todos los issues de generative-computing/mellea

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.