Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Flattened observations disagree with explicitly declared task specifications

Aberta
#557 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
74/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
numpy, python

Direção de pesquisa

Start at control.Environment.observation_spec and compare the explicit-spec path with the existing fallback flattening path used when no specification is declared. Check that flat_observation preserves shapes and NumPy dtype promotion without materializing observations or calling get_observation, while leaving the caller's spec and mapping type unchanged. Run the regression against reset and step behavior to confirm the declared and inferred paths agree.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Reproduction

On current main, an environment using flat_observation=True flattens the values returned by reset and step, but returns an unflattened specification when the task implements observation_spec.

For example, a task declaring a float32 position array of shape (2,) and an int32 scalar mode produces one float64 observations array of shape (3,). Environment.observation_spec() instead returns the original two specifications.

The fallback path for tasks without an explicit specification already flattens correctly. Agents that allocate or validate observations from the environment specification therefore behave differently depending on whether the task supplies its own spec.

Expected behavior

Flatten the declared shapes and apply NumPy's concatenation dtype promotion when flattening is enabled, without materializing observation arrays or calling get_observation. Preserve the caller's spec, mapping type, normal unflattened behavior, and the existing inference path.

Reproduced with actual control.Environment calls and a small native MuJoCo task. The new regression fails on current main at a04e3e4cf56c12117d2294bb090f9acec21e5c67; no renderer, trained policies or external service is required.

Linguagem predominante
Python
Estrelas
4.7k
Forks
765
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de google-deepmind/dm_control

Todas as issues de google-deepmind/dm_control

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.