Skip to content

Commit

Permalink
[CLN] Remove unused config (#2057)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - This PR cleans up unused configuration in config parsing
 - New functionality
	 - ...

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
Ishiihara authored Apr 25, 2024
1 parent 0056c13 commit 99381f2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rust/worker/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl RootConfig {
// Unfortunately, figment doesn't support environment variables with underscores. So we have to map and replace them.
// Excluding our own environment variables, which are prefixed with CHROMA_.
let mut f = figment::Figment::from(Env::prefixed("CHROMA_").map(|k| match k {
k if k == "num_indexing_threads" => k.into(),
k if k == "my_ip" => k.into(),
k => k.as_str().replace("__", ".").into(),
}));
Expand All @@ -70,10 +69,10 @@ impl RootConfig {
}
// Apply defaults - this seems to be the best way to do it.
// https://github.com/SergioBenitez/Figment/issues/77#issuecomment-1642490298
f = f.join(Serialized::default(
"worker.num_indexing_threads",
num_cpus::get(),
));
// f = f.join(Serialized::default(
// "worker.num_indexing_threads",
// num_cpus::get(),
// ));
let res = f.extract();
match res {
Ok(config) => return config,
Expand Down

0 comments on commit 99381f2

Please sign in to comment.