-
Notifications
You must be signed in to change notification settings - Fork 373
Exit after running export() #308
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: 3.0
Are you sure you want to change the base?
Conversation
This reverts commit 472046f.
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.
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) |
Copilot
AI
Jul 30, 2025
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.
Using os._exit(0) bypasses normal cleanup and exception handling. Consider using sys.exit(0) instead, which allows for proper cleanup and exception handling.
| os._exit(0) | |
| sys.exit(0) |
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.
sys.exit didn't work btw.
This reverts commit 94cb725.
Also print a command to copy the weights to the resources dir.