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 module import #698

Closed
wants to merge 4 commits into from
Closed

Conversation

vishesh9131
Copy link
Contributor

Pull Request: Fix Incorrect Module Import in layers.py

Summary

This pull request addresses an issue with an incorrect module import in the axlearn/common/quantized_dot_general/layers.py file. The import and usage of the Context class from the aqt_dot_general module have been corrected to use the appropriate Context class from the aqt_utils module.

Changes

1. Import Correction:

  • Changed the import from aqt.jax.v2.aqt_dot_general to aqt.jax.v2.utils and aliased it as aqt_utils.

2. Context Class Usage:

  • Updated the usage of the Context class to use aqt_utils.Context instead of aqt_dot_general.Context.

Code Changes

1. Importing aqt_utils

from aqt.jax.v2 import utils as aqt_utils

2. Taken Reference from the official README of aqt

context: aqt_dot_general.Context = aqt_dot_general.Context(key=None, train_step=None),

to

context: aqt_utils.Context = aqt_utils.Context(key=None, train_step=None),

Testing

  • Verified that the changes resolve the AttributeError and the code runs successfully without any issues.

These enhancements provide additional flexibility and options for implementing and experimenting with different recurrence methods in the Mamba and Jamba models, potentially improving performance and accuracy for various tasks.
- fixed functions redundant definitions
- fixed Incorrect Module Import in layers.py
Copy link
Contributor

@jiarui-lu2 jiarui-lu2 left a comment

Choose a reason for hiding this comment

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

Thx!

@vishesh9131
Copy link
Contributor Author

Hi @markblee,

Both ruomingp and jiarui-lu2 have approved the changes to the PR. Could you please take a final look when you get a chance? Thanks again for your time!

Best,
Vishesh

@jiarui-lu2
Copy link
Contributor

Hi @vishesh9131, I think PR check was on hold due to a required approval in CI. I've approved it and CI should be starting now

@vishesh9131
Copy link
Contributor Author

@jiarui-lu2
@ruomingp
@markblee

Do I Need to modify .circleci/config.yml to include the installation of the latest aqt package, since there is an issue occurring in a CircleCI environment...
I mean modification in .circleci/config.yml like this :

 build:
    docker:
      - image: circleci/python:3.9
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            python -m pip install --upgrade pip
            pip install aqt
      - run:
          name: Run pytype
          command: pytype -j auto

@jiarui-lu2
Copy link
Contributor

@jiarui-lu2 @ruomingp @markblee

Do I Need to modify .circleci/config.yml to include the installation of the latest aqt package, since there is an issue occurring in a CircleCI environment... I mean modification in .circleci/config.yml like this :

 build:
    docker:
      - image: circleci/python:3.9
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            python -m pip install --upgrade pip
            pip install aqt
      - run:
          name: Run pytype
          command: pytype -j auto

I don't think upgrading aqt is recommended. Minimum python version supported by axlearn is python3.9, however last time I checked for aqt>=0.5.0, minimum supported python version is python3.10 due to the use of newly introduced typing aliases. If this PR relies on aqt>=0.5.0, I think we should close it until either aqt fixes this issue, or axlearn is ready to upgrade its minimum python version requirements.

Copy link
Contributor

@jiarui-lu2 jiarui-lu2 left a comment

Choose a reason for hiding this comment

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

See comment about aqt versions.

@vishesh9131
Copy link
Contributor Author

Hi @jiarui-lu2 ,

I understand your concerns regarding the aqt package and its compatibility with Python 3.9. I wanted to inform you that the latest version of aqt (>=0.5.0) supports Python 3.10.
Would it be possible to consider upgrading the CircleCI configuration to use Python 3.10? This would allow us to use the latest aqt package and resolve the current issue.
Please let me know your thoughts on this.

Best regards,
@vishesh9131

@jiarui-lu2
Copy link
Contributor

Hi @jiarui-lu2 ,

I understand your concerns regarding the aqt package and its compatibility with Python 3.9. I wanted to inform you that the latest version of aqt (>=0.5.0) supports Python 3.10. Would it be possible to consider upgrading the CircleCI configuration to use Python 3.10? This would allow us to use the latest aqt package and resolve the current issue. Please let me know your thoughts on this.

Best regards, @vishesh9131

The main concern I have is not of Circle CI. axlearn repo formally supports python3.9 as stated here. Depending on a package aqt>-0.5.0 that has a minimum requirement of python3.10 breaks that support. Which is why I said

I think we should close it until either aqt fixes this issue, or axlearn is ready to upgrade its minimum python version requirements.

@vishesh9131
Copy link
Contributor Author

Hi @jiarui-lu2 ,

I understand your concern about maintaining Python 3.9 support for the axlearn repo. Given that aqt>=0.5.0 requires Python 3.10, I agree that we should close this PR until either aqt addresses this issue or axlearn is ready to upgrade its minimum Python version requirements.
Thanks for the clarification.

Best,
@vishesh9131

@jiarui-lu2
Copy link
Contributor

jiarui-lu2 commented Sep 16, 2024

According to the discussions, closing PR due to python minimum version support. We should revisit if axlearn increases its minimum python version support to > =3.10

@vishesh9131
Copy link
Contributor Author

vishesh9131 commented Oct 2, 2024

According to the discussions, closing PR due to python minimum version support. We should revisit if axlearn increases its minimum python version support to > =3.10

Hi @jiarui-lu2,

Since Axlearn now supports Python 3.10, could you reopen this closed PR? According to the previous discussions, the closure was due to the minimum Python version support issue. Now that the support has been updated, it seems like a good time to revisit.

Best regards,
Vishesh

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.

3 participants