We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Omega conf can't parse the valid yaml file with anchors defined. The following yaml throws duplicate key error for the section:
anthropic-cached: &anthropic-cache <<: *anthropic
When I replace that it works. That's a valid yaml format and key merging should happen
To Reproduce
_models: anthropic: &anthropic type: &LLM LargeModel backend: anthropic model: claude-3-5-sonnet-20240620 credentials: anthropic-api-key model_params: &model-params temperature: !!float 0.5 anthropic-cached: &anthropic-cache <<: *anthropic model_params: <<: *model-params extra_headers: anthropic-beta: prompt-caching-2024-07-31 google: &google type: *LLM backend: google model: google/gemini-1.5-pro model_params: *model-params backend_kwargs: region: europe-west1 project_id: 546565-n0 llama-v3p1: &llama-v3p1 type: *LLM backend: fireworks model: accounts/fireworks/models/llama-v3p1-70b-instruct credentials: fireworks-api-key model_params: <<: *model-params max_tokens: 16384
Expected behavior I expect omegaconf to read the file without errors.
Additional context
The text was updated successfully, but these errors were encountered:
I cannot reproduce:
from yaml import safe_load from omegaconf import OmegaConf from ruamel.yaml import YAML yaml = YAML() with open("conf.yaml") as fh: content = safe_load(fh) content_oc = OmegaConf.load("conf.yaml") with open("conf.yaml") as fh: content_ru = yaml.load(fh.read())
In [20]: OmegaConf.to_container(content_oc) == content Out[20]: True In [21]: OmegaConf.to_container(content_oc) == content_ru Out[21]: True
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Omega conf can't parse the valid yaml file with anchors defined. The following yaml throws duplicate key error for the section:
When I replace that it works. That's a valid yaml format and key merging should happen
To Reproduce
Expected behavior
I expect omegaconf to read the file without errors.
Additional context
The text was updated successfully, but these errors were encountered: