Skip to content

Updated "Get your code snippet" section for relevant notebooks #251

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

Merged

Conversation

validbeck
Copy link
Collaborator

@validbeck validbeck commented Nov 26, 2024

Internal Notes for Reviewers

To support the infrastructure we are introducing in sc-7505, I have updated the Initialize the ValidMind Library: Get your code snippet section in the relevant Jupyter Notebooks to look like this:

Screenshot 2024-11-26 at 12 43 10 PM
  • When possible, I updated the example registration details to the newer structure
  • If there wasn't a header and anchor for Get your code snippet I added it and made sure the ToC link inserted worked
  • I added a link out to the .env file docs as we changed the code snippet example to include this method

@cachafla If you can help me out with the templates for the notebooks in the below Story's comment I can get those updated too. 🙏🏻

https://app.shortcut.com/validmind/story/6753/update-initalize-validmind-section-for-all-notebooks

@validbeck validbeck added the internal Not to be externalized in the release notes label Nov 26, 2024
@validbeck validbeck self-assigned this Nov 26, 2024
@cachafla
Copy link
Contributor

@cachafla If you can help me out with the templates for the notebooks in the below Story's comment I can get those updated too. 🙏🏻

Replied on the ticket 👍

Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀🚀🚀

Checked out your PR locally and spot checked a few notebooks , plus I looked through the changes on GitHub. Looks to be safe to merge and does a nice job of enabling .env files across the board.

@validbeck validbeck merged commit f237b61 into main Nov 28, 2024
5 checks passed
Copy link
Contributor

PR Summary

This pull request enhances the ValidMind Library's initialization process across multiple Jupyter notebooks by introducing support for loading model identifier credentials from an .env file. This change allows users to securely manage their API credentials and model identifiers without hardcoding them directly into the notebooks. The following key updates have been made:

  • Added instructions and code snippets to load environment variables using the dotenv extension in Jupyter notebooks.
  • Updated the initialization process to optionally use credentials from an .env file, providing a more secure and flexible way to manage sensitive information.
  • Modified markdown sections in notebooks to guide users on how to set up and use the .env file for storing credentials.
  • Adjusted the documentation to reflect these changes, ensuring users are aware of the new method for handling credentials.

These changes improve the security and usability of the notebooks by allowing users to keep their credentials separate from the codebase.

Test Suggestions

  • Test the initialization of the ValidMind Library using credentials stored in an .env file to ensure they are correctly loaded and used.
  • Verify that the notebooks still function correctly when credentials are provided directly in the code, ensuring backward compatibility.
  • Check that the instructions for setting up the .env file are clear and lead to successful initialization of the library.
  • Ensure that the dotenv extension is correctly loaded and does not interfere with other notebook operations.
  • Test the notebooks in different environments to confirm that the .env file is correctly recognized and utilized.

@johnwalz97 johnwalz97 deleted the beck/sc-7505/update-relevant-validmind-library-notebooks branch December 5, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Not to be externalized in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants