Skip to content

Conversation

@SiddhantSadangi
Copy link
Member

@SiddhantSadangi SiddhantSadangi commented Sep 30, 2025

Description

  • Fetching W&B projects only for the requested entity
  • Defaulting newly created Neptune projects to have priv visibility

Related to: <ClickUp/JIRA task name>

Any expected test failures?


Add a [X] to relevant checklist items

❔ This change

  • adds a new feature
  • fixes breaking code
  • is cosmetic (refactoring/reformatting)

✔️ Pre-merge checklist

  • Refactored code (sourcery)
  • Tested code locally
  • Precommit installed and run before pushing changes
  • Added code to GitHub tests (notebooks, scripts)
  • Updated GitHub README
  • Updated the projects overview page on Notion

🧪 Test Configuration

  • OS:
  • Python version:
  • Neptune version:
  • Affected libraries with version:

Summary by Sourcery

Fix the W&B to Neptune migration script by scoping project fetches to the given entity and setting newly created Neptune projects to private by default, and update the README accordingly.

Bug Fixes:

  • Filter W&B projects by the specified entity when fetching projects
  • Default newly created Neptune projects to private visibility

Documentation:

  • Update migration README to reflect the default private visibility and improve table formatting

Note

Filters W&B projects by entity and sets new Neptune projects to private visibility; updates README accordingly.

  • Script (utils/migration_tools/from_wandb/wandb_to_neptune.py):
    • Filter W&B projects by specified entity via client.projects(entity=wandb_entity).
    • Create Neptune projects with visibility="priv" instead of "workspace".
  • Docs (utils/migration_tools/from_wandb/README.md):
    • Update visibility to private and adjust line references.
    • Reformat metadata mapping table and post-migration bullets.

Written by Cursor Bugbot for commit 7ec5730. This will update automatically on new commits. Configure here.

…ed W&B entity, and defaulting Neptune projects to have `priv` visibility
@SiddhantSadangi SiddhantSadangi self-assigned this Sep 30, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Sep 30, 2025

Reviewer's Guide

This PR restricts W&B project fetching to a specified entity and defaults newly created Neptune projects to private visibility, with accompanying documentation updates.

Sequence diagram for fetching W&B projects for a specific entity

sequenceDiagram
    participant Script
    participant W&B_Client
    Script->>W&B_Client: projects(entity=wandb_entity)
    W&B_Client-->>Script: List of projects for entity
    Script->>Script: Process projects
Loading

Class diagram for updated project creation logic

classDiagram
    class WandbClient {
        +projects(entity)
    }
    class NeptuneManagement {
        +create_project(name, description, visibility)
    }
    class MigrationScript {
        +copy_project(wandb_project)
    }
    WandbClient <.. MigrationScript : uses
    NeptuneManagement <.. MigrationScript : uses
    MigrationScript : +wandb_entity
    MigrationScript : +neptune_workspace
    MigrationScript : +wandb_project_name
    MigrationScript : +visibility = "priv"
Loading

File-Level Changes

Change Details Files
Limit W&B project fetching to specified entity
  • Add entity=wandb_entity filter to client.projects call
utils/migration_tools/from_wandb/wandb_to_neptune.py
Default newly created Neptune projects to private visibility
  • Change create_project visibility argument from "workspace" to "priv"
utils/migration_tools/from_wandb/wandb_to_neptune.py
Update documentation to reflect visibility change and formatting tweaks
  • Mention private default visibility and update line references in README
  • Reformat tables, adjust whitespace, and fix markdown styling
utils/migration_tools/from_wandb/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@SiddhantSadangi SiddhantSadangi requested a review from a team September 30, 2025 08:02
@SiddhantSadangi SiddhantSadangi added the bug Something isn't working label Sep 30, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider making the default Neptune project visibility ('priv') a configurable option rather than hardcoding it in the script.
  • The README's references to specific script line numbers (e.g., L319, L338) will quickly become outdated—consider pointing to function names or configuration settings instead.
  • Add validation or a clear error message for when wandb_entity isn't supplied before calling client.projects(entity=wandb_entity).
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider making the default Neptune project visibility ('priv') a configurable option rather than hardcoding it in the script.
- The README's references to specific script line numbers (e.g., L319, L338) will quickly become outdated—consider pointing to function names or configuration settings instead.
- Add validation or a clear error message for when wandb_entity isn't supplied before calling client.projects(entity=wandb_entity).

## Individual Comments

### Comment 1
<location> `utils/migration_tools/from_wandb/wandb_to_neptune.py:107` </location>
<code_context>

</code_context>

<issue_to_address>
**issue (code-quality):** Unused skip comment ([`unused-skip-comment`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/Python/Default-Rules/unused-skip-comment))
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@SiddhantSadangi SiddhantSadangi merged commit bd5bb83 into main Sep 30, 2025
10 checks passed
@SiddhantSadangi SiddhantSadangi deleted the ss/wandb_script_fix branch September 30, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants