-
Notifications
You must be signed in to change notification settings - Fork 5
Updates to minimizer #509
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
base: main
Are you sure you want to change the base?
Updates to minimizer #509
Conversation
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.
Lintly has detected code quality issues in this pull request.
|
TODO: leverage verifier work to replace old "canary" idea and add support for verifier as minimization criteria. |
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.
Lintly has detected code quality issues in this pull request.
| output_file = os.path.join(self.proj_dir, "minimize_attempts.yaml") | ||
| with open(output_file, "w") as f: | ||
| yaml.dump(self.attempts, f) | ||
| #else: |
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.
E265: block comment should start with '# '
| else: | ||
| self.logger.info(f"Config already exists at {output_file}, not overwriting") | ||
| #if not os.path.exists(output_file): | ||
| #if we got here and this was already ran, we've specified --force |
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.
E265: block comment should start with '# '
| yaml.dump(self.base_config, f) | ||
| else: | ||
| self.logger.info(f"Config already exists at {output_file}, not overwriting") | ||
| #if not os.path.exists(output_file): |
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.
E265: block comment should start with '# '
| # Assuming orthoganality of patches, we'll generate a config without each patch | ||
| # Greater than 2 since if we have two left binary search would've tested them both | ||
| if len(self.patches_to_test) > 2 or not self.binary_search: | ||
| #if len(self.patches_to_test) > 2 or not self.binary_search: |
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.
E265: block comment should start with '# '
| self.logger.warning(f"{timestamp}: Error running wget: {e}") | ||
| response = requests.get(url, verify=False, timeout=30) | ||
| with open(log_file_name, 'wb') as log_file: | ||
| log_file.write(response.content) |
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.
E111: indentation is not a multiple of 4
| except subprocess.CalledProcessError as e: | ||
| self.logger.warning(f"{timestamp}: Error running wget: {e}") | ||
| response = requests.get(url, verify=False, timeout=30) | ||
| with open(log_file_name, 'wb') as log_file: |
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.
E111: indentation is not a multiple of 4
| subprocess.check_output(cmd, timeout=30) | ||
| except subprocess.CalledProcessError as e: | ||
| self.logger.warning(f"{timestamp}: Error running wget: {e}") | ||
| response = requests.get(url, verify=False, timeout=30) |
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.
E111: indentation is not a multiple of 4
This is the branch of the patch minimizer that was used for the latest experiments. Won't merge PR yet, just tracking that the code should be merged eventually.