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

Make lunar lander fail in CI due to not installing swig #366

Merged
merged 14 commits into from
Sep 10, 2023

Conversation

btjanaka
Copy link
Member

@btjanaka btjanaka commented Sep 10, 2023

Description

The lunar lander tutorial and example were both working in the CI even though we had not installed swig. It turns out that swig is installed in the GitHub Actions container by default (see actions/runner-images#1203), which means that box2d could install properly without running pip install swig. This PR removes swig during the installation for tutorials and examples, so that the lunar lander tutorial will fail properly. The issue will be fixed in a followup PR.

TODO

  • Remove swig in tutorial CI (tutorials will still work since the lunar lander tutorial installs swig)
  • Remove swig in example CI

Questions

Status

  • I have read the guidelines in
    CONTRIBUTING.md
  • I have formatted my code using yapf
  • I have tested my code by running pytest
  • I have linted my code with pylint
  • I have added a one-line description of my change to the changelog in
    HISTORY.md
  • This PR is ready to go

@btjanaka btjanaka changed the title Fix lunar lander dependency issues Make lunar lander fail in CI due to not installing swig Sep 10, 2023
@btjanaka btjanaka mentioned this pull request Sep 10, 2023
13 tasks
@btjanaka btjanaka merged commit d818f43 into master Sep 10, 2023
16 of 17 checks passed
@btjanaka btjanaka deleted the lander-tutorial branch September 10, 2023 13:48
@btjanaka btjanaka mentioned this pull request Sep 10, 2023
7 tasks
btjanaka added a commit that referenced this pull request Sep 10, 2023
## Description

<!-- Provide a brief description of the PR's purpose here. -->

We have been running into some issues with lunar lander not running
properly on Colab due to dependency issues. We also had some dependency
issues with swig (see #366).

Regarding swig, I found that it was difficult to get the examples to
work properly with swig because we were not using a virtual environment,
so the different Python versions were being confused -- hence we would
get errors like "Module not found" when trying to use swig. To remedy
this problem, I have started #367 to run all PR jobs in a Conda env.
This PR uses a Conda env only for the examples job.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Upgrade to gymnasium 0.29.1 due to Jax-jumpy issues -> gymnasium
0.27.0 depended on jax-jumpy, which resulted in installation errors
because jax-jumpy was not fully production-ready
- [x]  Fix ordering of Dask imports
- [x] Re-run tutorial on Colab to get times; update tutorial times
accordingly
- [x] Run on Colab and fix deprecation warnings -> looks like there were
no warnings
- [x] Try running locally in Python 3.10 -> Colab CPU seems really slow
compared to local CPU, but this makes sense
- [x]  Fix deps in lunar lander example
- [x] Make example.sh script run multiple pip install commands

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
btjanaka added a commit that referenced this pull request Sep 10, 2023
## Description

<!-- Provide a brief description of the PR's purpose here. -->

We encountered an issue in #366 where different Python instances caused
swig to not be found. To prevent this and similar issues in the future,
this PR creates Conda envs to ensure that we always / are more likely to
use the correct version of Python.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

## Questions

<!-- Any concerns or points of confusion? -->

- [x] Should we use Tox?
- For now, I believe Tox would introduce too much complexity. All we
want is to create a virtual env for each job. Tox may be able to do this
with less boilerplate, but we would also incur overhead to learn how to
use it properly. Conda envs also more closely match our audience of
researchers.
- Note that we did have Tox originally, but we removed it in #143 to
simplify our workflows.

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
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