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

✨ Xircuits Entry Handler for Components + Submodule Components Download #152

Merged
merged 9 commits into from
Apr 25, 2022

Conversation

MFA-X-AI
Copy link
Member

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

Description

This PR introduces more console commands which focuses on downloading component libraries. While dev users using the cloned repo can use git submodule init and git submodule update to pull the xai_components, users downloading from pip will not be able to as it is no longer a git repository.

This PR introduces the xircuits-components command that allows users to download them.

References

If applicable, note issue numbers this pull request addresses. You can also note any other pull requests that address this issue and how this pull request is different.

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. Check normal Xircuits component command

  1. Install the wheel from the github action
  2. run xircuits-components. Verify that xai_components have been downloaded.

2. Check Xircuits component command from a specific branch

  1. Delete previous xai_components directory
  2. run xircuits-components --branch branchName. Verify that the xai_components of that branch have been downloaded. For this you may try branch ``xai_object_classification`. The object_classification components should be there.

3. Check Xircuits submodule component command from a submodule

  1. Delete previous xai_components directory
  2. run xircuits-components --sublib componentLibraryName. For this example I will mostly use xai_pycaret. Verify that:
    1. You can download the component library by using either xircuits-components --sublib xai_pycaret or xircuits-components --sublib pycaret
    2. Using the --sublib tag when multiple libraries have the same name will return the first instance (try --sublib xai)
    3. Supplying a lib that does not exist will return an error message component library submodule not found.
    4. You can chain multiple libraries. xircuits-components --sublib pycaret modelstash

4. Check Xircuits Init
Check any of the previous xircuits console commands, like xircuits-examples. It will always print the message and init .xircuits.

Tested on?

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

Notes

  1. With the current method, users clone from master instead of the specific submodule commit.
  2. I've also added 3 ADRs with this PR on the context, refactor component libraries as submodules, as well as submodule libraries and templates.

@MFA-X-AI MFA-X-AI changed the title ✨ Xircuits Entry Handler for Submodule Components ✨ Xircuits Entry Handler for Components + Submodule Components Download Apr 20, 2022
@MFA-X-AI MFA-X-AI marked this pull request as ready for review April 20, 2022 06:32
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.

Thank you for the PR, this feature will be very useful for Xircuits built using the wheel.

Tests:

  1. Check normal Xircuits component command

Test Passed

  1. Check Xircuits component command from a specific branch

Test Failed

Ran command xircuits-components --branch xai_object_classification

output:
image

image

  1. Check Xircuits submodule component command from a submodule
    i. run xircuits-components --sublib componentLibraryName. For this example I will mostly use xai_pycaret. Verify that:
    You can download the component library by using either xircuits-components --sublib xai_pycaret or --sublib pycaret

Test Passed

ii. Using the --sublib tag when multiple libraries have the same name will return the first instance (try --sublib xai)

Test Passed

  • It would be nice to print out the multiple libraries found and the downloaded first instance.

iii. Supplying a lib that does not exist will return an error message component library submodule not found.

Test Passed

iv. You can chain multiple libraries. xircuits-components --sublib pycaret modelstash

Test Passed

  1. Check Xircuits Init, testing xircuits-examples

Test Passed

  • Recommended test after the fixes: Run the same testing process using a user without access to the private repo.

@MFA-X-AI MFA-X-AI requested a review from mansouralawi April 25, 2022 00:41
@MFA-X-AI
Copy link
Member Author

MFA-X-AI commented Apr 25, 2022

Thanks for the review,

Ran command xircuits-components --branch xai_object_classification

should be fixed now.

Run the same testing process using a user without access to the private repo.

I was actually planning to do this in this PR, however as I also want to implement a semi-persistent way of allowing users to store their access token securely, it'll be a new feature by itself.

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 changes.

All technical tests passed successfully.

It will be nice to implement these:

  • Progress bar for component library download.
  • Print out the multiple libraries found and the downloaded first instance.

@MFA-X-AI
Copy link
Member Author

MFA-X-AI commented Apr 25, 2022

Awesome. For these last 2:

Progress bar for component library download.
Print out the multiple libraries found and the downloaded first instance.

Added in 85b4cae and eb83dff
The progress bar isn't perfect since it's printing in-line, but it does serve the purpose of displaying progress in real time.

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 extra features. both work fine.

@mansouralawi mansouralawi merged commit caccf96 into master Apr 25, 2022
@mansouralawi mansouralawi deleted the fahreza/submodule-component-server-handler branch April 25, 2022 09:24
@MFA-X-AI MFA-X-AI mentioned this pull request Oct 4, 2023
16 tasks
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.

2 participants