-
Notifications
You must be signed in to change notification settings - Fork 22
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
Merge some changes of CROWN_tutorial branch with main #286
base: main
Are you sure you want to change the base?
Conversation
code_generation/configuration.py
Outdated
@@ -88,7 +89,7 @@ def __init__( | |||
self.available_scopes = set(available_scopes) | |||
self.available_outputs: Dict[str, QuantitiesStore] = {} | |||
self.available_shifts: Dict[str, Set[str]] = {} | |||
self.global_scope = "global" | |||
self.global_scope = global_scope |
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.
If you want to do this you probably also need propagate this everywhere where "global"
is explicitly used. Like here
CROWN/code_generation/quantity.py
Line 41 in 95ea5cb
if (scope == "global" and self.defined_for_scopes == []) or ( |
CROWN/code_generation/optimizer.py
Line 82 in 95ea5cb
if producer.get_outputs("global") is not None: |
as just a few examples.
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.
The intended change here is to only provide the option to not have a global
scope at all. A more direct choice for this was implemented in Link. As of now, there is no documentation for this feature.
Renaming the global scope is not really needed in my opinion.
It is currently not possible to only have a global scope due to a separate bug that is out of the scope of this PR.
The two cases lead to a very similar outcome (Only having a single scope), but the option to not have a global scope at all leaves more options for the naming of scopes. It also works with the case in which all scopes are treated differently from the very start and no global scope would be used.
…l', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution.
Some of the 'if cases' in the code make assumptions that lead to unintended consequences. One such example: |
…->'global', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution." This reverts commit 542ca2c.
…e->'global', False->None). Introduce more coverage for potential types in multiple 'if cases'. The handling of empty lists and boolean variables can be somewhat finicky due to the way some cases are set up. Treat with caution." This reverts commit f34aa06.
* Update introduction.rst * Update changelog.rst * Update changelog.rst * Update postprocessing.rst * Update friend_trees.rst * Update build_root.rst * Update contrib.rst * added missing reference * Update contrib.rst * Fixed references --------- Co-authored-by: jannikdemand <[email protected]> Co-authored-by: jannikdemand <[email protected]>
Replace "is not None" checks as lists/sets/dicts are not seen as "None", even when empty.
Allow for renaming of global scope and usage of no global scope by changing the setting in the analysis config.
Add empty build dir.