Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
17 stars 4 forks source link

initial commit for github connector work WIP #391

Closed steve-barnard closed 7 months ago

steve-barnard commented 7 months ago

Addresses #388 (https://github.com/Garden-AI/garden/issues/388)

Overview

First draft at the GitHubConnector class. Should have relative parity with the. HFConnector class. Likely needs additional thorough UAT but seems to be replicating the existing class.

Unsure if save_session_and_metadata.py needs to be modified to account for the new connector. Also a minor sp. correction in a docstring.

Discussion

Pass in the repo URL and specify a specific SHA/commit if desired (see updated class). Important to note that the example repo used here https://github.com/uw-cmg/ASR_model was the same as in the video demo from the end of 2023. This being a GH repo and not the HF hub 'repo' meant that there was an additional unzipping step needed to get the serialized models; this should be visible in the attached image showing the code used.

Testing

Open up a garden notebook: garden-ai notebook start tutorial_notebook.ipynb --base-image=3.10-sklearn Install this dev branch of garden-ai via the following command in the notebook: !pip install git+https://github.com/Garden-AI/garden.git@26a32cf8c0ac519634f3fd2c242eab5190c40d5a

Follow the code in the image below which replicated the code from the December 2023 demo from Will.

image

I followed the video demo and was able to produce the same results via the predictions with the HFConnector class and GitHubConnector class.

Also added a similar unit test to the only other test to reference the HFConnector.

Documentation

After additional user testing and consensus that the GitHubConnector is at parity, it may be beneficial to update some additional documentation, but no noted updates are required at this time.


📚 Documentation preview 📚: https://garden-ai--391.org.readthedocs.build/en/391/

codecov-commenter commented 7 months ago

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (7c4a36e) 75.69% compared to head (190b81a) 75.76%. Report is 2 commits behind head on main.

Files Patch % Lines
garden_ai/model_connectors/github_conn.py 52.50% 19 Missing :warning:
garden_ai/scripts/save_session_and_metadata.py 0.00% 2 Missing :warning:
tests/test_models.py 91.66% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #391 +/- ## ========================================== + Coverage 75.69% 75.76% +0.06% ========================================== Files 42 45 +3 Lines 2432 2595 +163 ========================================== + Hits 1841 1966 +125 - Misses 591 629 +38 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.