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 failing CI #2757

Merged
merged 5 commits into from
Oct 29, 2022
Merged

Fix failing CI #2757

merged 5 commits into from
Oct 29, 2022

Conversation

louis-she
Copy link
Contributor

@github-actions github-actions bot added the ci CI label Oct 29, 2022
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 29, 2022

Let's put Neptune fix here and try to fix RL example as well once we understand the root of the issue.

@vfdev-5 vfdev-5 changed the title make pip install verbose in CI Fix failing CI Oct 29, 2022
@@ -187,7 +187,10 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:

if kwargs.get("offline_mode", False):
self.mode = "offline"
neptune.init(project_qualified_name="dry-run/project", backend=neptune.OfflineBackend())
neptune.init(
Copy link
Collaborator

@vfdev-5 vfdev-5 Oct 29, 2022

Choose a reason for hiding this comment

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

@Blaizzy can you check if this is a correct fix ?
Apparently, we have to change more code, see #2758

Copy link

Choose a reason for hiding this comment

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

I will take a look at it tomorrow morning :)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 29, 2022

@louis-she can you please disable neptune tests such that we could merge this PR.

Do you think this version pin is necessary ?

gym==0.26.2

@louis-she
Copy link
Contributor Author

the root cause of the 2 errors, one from neptune-client and one from gym, is the version resolve conflicts of the 2 packages.
If install with neptune-client==0.16.11 gym==0.26.2 , error will raised:

ERROR: Cannot install gym==0.26.2 and neptune-client==0.16.11 because these package versions have conflicting dependencies.

The conflict is caused by:
    neptune-client 0.16.11 depends on importlib-metadata<4; python_version < "3.8.0"
    gym 0.26.2 depends on importlib-metadata>=4.8.0; python_version < "3.10"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

The pip install will resolve the conflicts by get the older version of gym, and that's why the CI failed with gym. The gym is resolved to version 0.20.0 (since we do not ping the version of gym). And that will lead to the seed error.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 29, 2022

Thanks for the explanation @louis-she !

I would suggest to temporarily comment out neptune dependency in requirements-dev.txt and add

pytest.skip("Temporarily skip neptune tests", allow_module_level=True)

into https://github.com/pytorch/ignite/blob/master/tests/ignite/contrib/handlers/test_neptune_logger.py to avoid failures.

Once neptune folks updated our code to their latest API version and also fix the issue with importlib-metadata we can reenable the tests. What do you think ?

EDIT: or keep your solution with downgraded neptune-client version, I like that as well !

@louis-she
Copy link
Contributor Author

I fixed the version of neptune to the last version before they did the legacy refactoring and leave the neptune test as it was in the past. Thus gym can be automatically resolved to the latest version 0.26.2 and pass the CI.

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks @louis-she !

@vfdev-5 vfdev-5 enabled auto-merge (squash) October 29, 2022 15:42
@vfdev-5 vfdev-5 merged commit ed8622c into pytorch:master Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants