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

refactor: run post_setup script on init #87

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

raresgaia123
Copy link
Contributor

made changes to that post_setup script is executed in init.py of multiworld error handlers were while executing the main method. with the first execution, the patch is applied and the user is prompted to re-run the script to have the patched version of torch

Description

Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.

Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

left comments

multiworld/post_setup.py Outdated Show resolved Hide resolved
multiworld/post_setup.py Outdated Show resolved Hide resolved
multiworld/post_setup.py Outdated Show resolved Hide resolved
multiworld/post_setup.py Outdated Show resolved Hide resolved
multiworld/post_setup.py Outdated Show resolved Hide resolved

try:
post_setup.main()
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this try-except statements. This simply catches the error but doesn't stop the script. This can cause confusion.

@myungjin
Copy link
Contributor

@myungjin
Copy link
Contributor

https://github.com/cisco-open/pymultiworld/blob/main/multiworld/__main__.py file is also not needed any more. Please remove it.

made changes to that post_setup script is executed in __init__.py of multiworld
error handlers were while executing the main method.
with the first execution, the patch is applied and the user is prompted to re-run the script to have the patched version of torch
Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

lgtm

@myungjin myungjin merged commit 0067182 into cisco-open:main Aug 29, 2024
1 check passed
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