-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat: omegaconf inventory by @MatteoVoges #1173
base: master
Are you sure you want to change the base?
Conversation
f9eaff9
to
0f982f9
Compare
Incremental changes from OmegaConf work #1173
249d61b
to
69d5883
Compare
@@ -100,10 +105,10 @@ def get_parameters(self, target_names: str | list[str], ignore_class_not_found: | |||
target = self.get_target(target_names, ignore_class_not_found) | |||
return target.parameters | |||
|
|||
return {name: target.parameters for name, target in self.get_targets(target_names)} | |||
return {name: {"parameters": Dict(target.parameters)} for name, target in self.get_targets(target_names)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return {name: {"parameters": Dict(target.parameters)} for name, target in self.get_targets(target_names)} | |
return {name: {"parameters": dict(target.parameters)} for name, target in self.get_targets(target_names)} |
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def compile_targets( | ||
inventory_path, search_paths, output_path, parallel, targets, labels, ref_controller, **kwargs | ||
inventory_path, search_paths, output_path, parallelism, desidered_targets, labels, ref_controller, **kwargs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is desidered_targets
a typo of desired_targets
?
@@ -38,6 +38,7 @@ coverage = "^7.5.0" | |||
docker = "^7.0.0" | |||
pytest-md = "^0.2.0" | |||
pytest-emoji = "^0.2.0" | |||
regex = "^2024.5.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a non-dev dependency, since the omegaconf migration implementation depends on the library
shutil.rmtree(compile_path) | ||
shutil.copytree(temp_compile_path, compile_path) | ||
logger.debug("Copied %s into %s", temp_compile_path, compile_path) | ||
logger.info(f"Compiled {len(targets)} targets in (%.2fs)", time.time() - compile_start) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that this log message looks odd, you probably want either
logger.info(f"Compiled {len(targets)} targets in (%.2fs)", time.time() - compile_start) | |
logger.info(f"Compiled {len(targets)} targets (%.2fs)", time.time() - compile_start) |
or
logger.info(f"Compiled {len(targets)} targets in (%.2fs)", time.time() - compile_start) | |
logger.info(f"Compiled {len(targets)} targets in %.2fs", time.time() - compile_start) |
Proposed Changes
Instructions
Activate the new inventory
or use the command line flag
--inventory-backend=omegaconf
Migrate your inventory to the new setup
Docs and Tests