Skip to content
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

Wandb fixes #25

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Wandb fixes #25

merged 1 commit into from
Sep 5, 2024

Conversation

andreasjansson
Copy link
Member

@andreasjansson andreasjansson commented Sep 5, 2024

  • Always log out (shouldn't be an issue but just in case)
  • Truncate long image file names
  • Catch all wandb exceptions

🚀 This description was created by Ellipsis for commit b77d30a

Summary:

This PR enhances wandb integration by ensuring proper logout, handling exceptions, and truncating long image file names.

Key points:

  • Always log out to ensure proper cleanup
  • Truncate long image file names
  • Catch all wandb exceptions
  • Added logout method in WeightsAndBiasesClient
  • Wrapped wandb operations in try-except blocks
  • Introduced truncate function for image file names
  • Moved wandb client initialization inside try-finally block
  • Adjusted train function to handle exceptions and cleanup

Generated with ❤️ by ellipsis.dev

@andreasjansson andreasjansson requested a review from fofr September 5, 2024 13:25
wandb_client.py Show resolved Hide resolved
* Always log out (shouldn't be an issue but just in case)
* Truncate long image file names
* Catch all wandb exceptions
@andreasjansson andreasjansson merged commit 6a4e57b into main Sep 5, 2024
2 checks passed

def finish(self):
with suppress(Exception):
wandb.finish()

def logout(self):
netrc_path = Path("/root/.netrc")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly manipulating the .netrc file is insecure and assumes a fixed path. Consider using environment variables or secure vaults for API key management.

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.

1 participant