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

Fix CD/CI notebooks #649

Merged
merged 20 commits into from
Oct 26, 2023
Merged

Fix CD/CI notebooks #649

merged 20 commits into from
Oct 26, 2023

Conversation

geek-yang
Copy link
Member

@geek-yang geek-yang commented Oct 18, 2023

Fix notebooks and build for CI/CD.

This PR closes #648 .

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@geek-yang geek-yang marked this pull request as ready for review October 18, 2023 09:20
@elboyran
Copy link
Contributor

Some checks did not pass. This time dashboard and build for 3.11.

@geek-yang
Copy link
Member Author

Some checks did not pass. This time dashboard and build for 3.11.

Hi @elboyran , thanks for your quick comment. This is not ready for review. Because of our settings in cd/ci, some tests only run when the PR is switched from draft to ready for review, that's why. Sorry for the confusion.

Anyway, I manage to fix all the builds and notebooks ci, but now dashboard fails 😓. I will try to fix it.

@geek-yang
Copy link
Member Author

Hi @elboyran @cwmeijer , I manage to fix tests for the notebooks and this PR is ready for review now!

@@ -44,7 +44,6 @@ runs:
python3 -m pip install tensorflow-cpu

- name: Install DIANNA
if: steps.cache-python-env.outputs.cache-hit != 'true'
Copy link
Member Author

Choose a reason for hiding this comment

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

When fixing the CI for notebooks, the build for python 3.11 on macos fails unexpectedly. Error message indicates that pytest is not found. I figured out that it was due to the installation, in which pytest was installed for python 3 but the ci calls pytest from python via system path. Therefore, it can be fixed by simply change run: pytest -v to run: python3 -m pytest -v.

However, this build will fail again if the caching of package installation is used (not sure why...). By removing the cache, it works nicely. But this makes the CD/CI slower than before. If anyone has better solution, please let me know. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

No other solution from me.

Copy link
Contributor

@elboyran elboyran left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it, even if it's slower now.

@@ -44,7 +44,6 @@ runs:
python3 -m pip install tensorflow-cpu

- name: Install DIANNA
if: steps.cache-python-env.outputs.cache-hit != 'true'
Copy link
Contributor

Choose a reason for hiding this comment

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

No other solution from me.

Copy link
Contributor

@cwmeijer cwmeijer left a comment

Choose a reason for hiding this comment

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

Some interesting things are happening here. I tried changing some things to more expected variations but I couldn't make them pass the builds. Great that you found a setup that indeed does all tests. Merge it!

@geek-yang
Copy link
Member Author

geek-yang commented Oct 26, 2023

Thanks for fixing it, even if it's slower now.

No worry. Thanks a lot for your review. I think it is quite tricky....Patrick and Chris also tried hard but still couldn't find a better solution. Let's just keep it like this then.

@geek-yang
Copy link
Member Author

Some interesting things are happening here. I tried changing some things to more expected variations but I couldn't make them pass the builds. Great that you found a setup that indeed does all tests. Merge it!

😅 It took me quite a while to find a solution. Tbh, I'm also not entirely sure about the cause of the failure. But they can be fixed this way. Thanks a lot for the review!

@geek-yang geek-yang merged commit d788cd7 into main Oct 26, 2023
18 checks passed
@geek-yang geek-yang deleted the fix_ci_notebooks branch October 26, 2023 08:04
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.

Fix notebooks running failures
3 participants