Skip to content

Conversation

@zestrada
Copy link
Collaborator

@zestrada zestrada commented Jan 7, 2025

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.

Copy link

@github-actions github-actions bot left a 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.

@zestrada
Copy link
Collaborator Author

TODO: leverage verifier work to replace old "canary" idea and add support for verifier as minimization criteria.

@zestrada zestrada marked this pull request as draft January 13, 2025 03:29
Copy link

@github-actions github-actions bot left a 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:

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

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):

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:

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)

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:

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)

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

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.

2 participants