Skip to content

Conversation

@Peru-S
Copy link

@Peru-S Peru-S commented Jul 30, 2025

Also print a command to copy the weights to the resources dir.

Copilot AI review requested due to automatic review settings July 30, 2025 01:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the export() function to automatically exit after completion and provides a helpful command for copying exported weights to the environment's resources directory.

  • Adds automatic exit after weight export completion
  • Prints a copy command to help users move weights to the correct resources location


target_name = env_name.replace('puffer_', '')
print(f'You can copy this to the environment\'s resources using cp -L {path} ./resources/{target_name}/{target_name}_weights.bin')
os._exit(0)
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

Using os._exit(0) bypasses normal cleanup and exception handling. Consider using sys.exit(0) instead, which allows for proper cleanup and exception handling.

Suggested change
os._exit(0)
sys.exit(0)

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

sys.exit didn't work btw.

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