Skip to content

Conversation

@vvihorev
Copy link
Contributor

Problem

offline parameter in _load_client function is unused.

Solution

Drop the parameter from all calls, function definition and docstring. This function is marked as internal, and hopefully not used by SDK users.

Changelog

drop unused offline parameter from cli_functions._load_client()

Copilot AI review requested due to automatic review settings April 17, 2025 14:09
@linear
Copy link

linear bot commented Apr 17, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the unused offline parameter from the _load_client function and its corresponding invocations.

  • Removed the offline argument in calls to _load_client() in utils.py, dataset.py, and cli_functions.py.
  • Updated the _load_client function signature and docstring accordingly.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
darwin/torch/utils.py Removed the unused offline argument in the _load_client call.
darwin/torch/dataset.py Removed the unused offline argument in the _load_client call.
darwin/cli_functions.py Updated multiple _load_client calls and its definition to drop offline.
Comments suppressed due to low confidence (3)

darwin/cli_functions.py:1507

  • Update the function's documentation to reflect the removal of the 'offline' parameter, ensuring that the docstring accurately describes the current parameter set.
def _load_client(

darwin/cli_functions.py:389

  • Verify that removing the 'offline' argument in export_dataset does not affect the expected behavior; ensure that _load_client returns a client configured for online use by default.
client: Client = _load_client()

darwin/cli_functions.py:448

  • Confirm that the removal of the 'offline' parameter in pull_dataset retains the intended guest client handling logic in _load_client.
client: Client = _load_client(maybe_guest=True)

@vvihorev vvihorev changed the title Remove unused offline param from _load_client [internal] Remove unused offline param from _load_client Apr 17, 2025
@umbertoDifa umbertoDifa merged commit 340ad6b into master Apr 18, 2025
24 checks passed
@umbertoDifa umbertoDifa deleted the dar-6482-remove-unused-offline-param-in-darwin-py branch April 18, 2025 08:56
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