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 Component Libraries as Submodules #148

Merged
merged 6 commits into from
Apr 13, 2022

Conversation

MFA-X-AI
Copy link
Member

@MFA-X-AI MFA-X-AI commented Apr 11, 2022

Description

Moving forward, there'll be a clearer description on how xai component libraries are organized.

  1. The default [full] installation of Xircuits will only include deep learning related libraries (Tensorflow, Pytorch, Onnx) as well as PySpark components.
  2. XAI component libraries that uses special frameworks like Pycaret or Selenium will be added as submodules. This allows library authors to have more control over their own component libraries.
  3. Correspondingly, the Xircuits examples of those component libraries are moved from the examples folder to their respective directories, which improves the housekeeping of the folder.

Ultimately this PR paves a path on how contributors can submit their own component libraries to the Xircuits repo, to which we can include in the list of submodules or in a future xai component manager. Users can also fork Xircuits and create their own component libraries pulled from their own repositories, private or not.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

1. Submodule Functionality Check

  1. Check that pycaret and modelstash component folders exist, but empty.

  2. Pull the xai_components by running:

    git submodule init
    git submodule update
    

    Confirm that you have the xai components now.
    If you would like to pull only 1 component library, you'll need to supply the path like:

    git submodule init xai_components/xai_yourLibrary
    git submodule update xai_components/xai_yourLibrary
    
  3. Check that you can update to the latest by:

    cd xai_component/xai_pycaret # or the component library you want to update
    git checkout main
    git pull
    

    or if you'd like to update all submodules at the same time:

    git submodule foreach git pull origin main
    

    I have just added a readme for modelstash components, see if you can pull the update from Xircuits.

  4. (bonus) Check if you can pull from a private repo. For demo purposes the pycaret components are temporarily set to be private. If you are logged in as a XpressAi member you should be able to pull it, and not without. This would require a fresh setup without your git account installed though... but it should theoretically work as expected.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

Notes

I'll need to add this to the documentation on how to component libraries as submodules. Essentially it's just:

git clone --recurse-submodules https://github.com/yourgithubrepolink xai_components/xai_yourLibrary

and it will be added to .gitmodules.

@MFA-X-AI MFA-X-AI marked this pull request as ready for review April 12, 2022 02:36
Copy link
Member

@mansouralawi mansouralawi 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 the PR.

The tests run successfully.

Although The expected functionality is there, we might need to make the user experience for components' downland and update a bit more user-friendly in the near future

Copy link
Contributor

@AdrySky AdrySky left a comment

Choose a reason for hiding this comment

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

Tested using wheel. LGTM. Thanks.

@AdrySky AdrySky merged commit 8a9ca7b into master Apr 13, 2022
@AdrySky AdrySky deleted the fahreza/component-submodules branch April 13, 2022 07:22
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