Skip to content
New issue

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

Configuration system implementation #78

Merged
merged 23 commits into from
Sep 11, 2024
Merged

Configuration system implementation #78

merged 23 commits into from
Sep 11, 2024

Conversation

adrienbanse
Copy link
Member

@adrienbanse adrienbanse commented Sep 4, 2024

When initializing ecologits with

Ecologits.init(
    providers = provider_list, 
    electricity_mix_zone = "BEL"
)

the static object Config (in ecologits.config) takes the corresponding attributes, and is module-wide accessible.

Remains to

  • Implement a verbose argument Implement proper logging
  • Write tests
  • Write corresponding doc

@adrienbanse adrienbanse linked an issue Sep 4, 2024 that may be closed by this pull request
@adrienbanse adrienbanse linked an issue Sep 5, 2024 that may be closed by this pull request
@adrienbanse
Copy link
Member Author

@samuelrince I didn't implement a verbose argument but a proper logging
Not finding a model or a mix are at the WARNING level
The user can then decide the level himself or herself.

@adrienbanse adrienbanse marked this pull request as ready for review September 9, 2024 11:20
ecologits/_ecologits.py Outdated Show resolved Hide resolved
ecologits/tracers/utils.py Outdated Show resolved Hide resolved
ecologits/tracers/utils.py Outdated Show resolved Hide resolved
ecologits/tracers/utils.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
tests/test_litellm.py Outdated Show resolved Hide resolved
tests/test_tracer.py Outdated Show resolved Hide resolved
@samuelrince
Copy link
Member

I let you @adrienbanse double-check the changes in the documentation, if you are ok with it, you can rebase and merge! :)

@adrienbanse adrienbanse merged commit 3593119 into main Sep 11, 2024
2 checks passed
@adrienbanse adrienbanse deleted the feat/init_config branch September 24, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deduplicate logging errors for "model not found" Configuration system
2 participants