Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Paperspace/gradient-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Paperspace/gradient-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: paperspace-python-v2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 351 files changed
  • 1 contributor

Commits on Feb 3, 2022

  1. Configuration menu
    Copy the full SHA
    4c8806e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c5ce14e View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2022

  1. Add basic session management

    This introduces a pretty lightweight overlay to enable session
    management within the Python client. The idea here is that in many
    non-trivial workflows, users will want to switch among different
    environments, or projects, or access levels easily and intuitively.
    E.g., being able to run code in a nonprod environment, validate it, and
    then elevate it into a production context.
    
    For a mature data science team, these different environments will likely
    be separated and have different sets of credentials to enable
    interaction with them. (An analogous real-world example here would be
    the AWS boto3 Python library, where a user can instantiate multiple
    `boto3.Session()` instances, each with separate credentials and IAM
    profiles.)
    
    There are a few ways we can enable this, but given some of the drawbacks
    of the previous iteration of this package I wanted to try and avoid a
    super class-heavy approach where we have client classes and wonky
    inheritence structures. So puttered around with a few alternatives and
    ended up settling on what we have here: a `Session` class and a function
    decorator that can wrap our http adapter. It needs a little bit of
    finessing still since I'm basically just always pulling the default
    session but it should be relatively straightforward to fix up.
    
    The big draw of this approach for me is that all of the client methods
    we implement can be totally agnostic to user credentials, which
    moderately simplifies the interaction pattern versus the GQL methods
    from V1 of the package, and pretty considerably simplifies things from
    the class-heavy clients that we're migrating away from.
    cwetherill-ps committed Feb 10, 2022
    Configuration menu
    Copy the full SHA
    8b66ff9 View commit details
    Browse the repository at this point in the history
  2. Introduce CRUD Deployments methods

    This adds create/update/delete/list/get methods for Deployments on API
    Next. Nothing really crazy going on here, just a query + function per
    file/method. Usage looks like:
    ```
    from paperspace import gradient
    
    gradient.deployments.list_deployments()
    ```
    for any of
      - `create_deployment()`
      - `update_deployment()`
      - `delete_deployment()`
      - `list_deployments()`
      - `get_deployment()`
    cwetherill-ps committed Feb 10, 2022
    Configuration menu
    Copy the full SHA
    31c9f1d View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2022

  1. Configuration menu
    Copy the full SHA
    bc6d7c1 View commit details
    Browse the repository at this point in the history
Loading