Skip to content

Commit

Permalink
Fix: Remove unnecessary calls to the lower() method
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddhantSadangi committed Aug 28, 2024
1 parent af17a30 commit 4325487
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
10 changes: 3 additions & 7 deletions utils/migration_tools/backup_neptune/bulk_download_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,9 @@
logging.info(f"Projects found: {projects}")

# %%
selected_projects = (
input(
"Enter projects you want to back up (comma-separated, no space) ('all' to export all projects): "
)
.strip()
.lower()
)
selected_projects = input(
"Enter projects you want to back up (comma-separated, no space) ('all' to export all projects): "
).strip()

logging.info(f"Exporting {selected_projects}")

Expand Down
12 changes: 6 additions & 6 deletions utils/migration_tools/from_another_project/runs_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
from tqdm.auto import tqdm

# %% Project Name
SOURCE_PROJECT = (
input("Enter the source project name (in WORKSPACE_NAME/PROJECT_NAME format): ").strip().lower()
)
SOURCE_PROJECT = input(
"Enter the source project name (in WORKSPACE_NAME/PROJECT_NAME format): "
).strip()

TARGET_PROJECT = (
input("Enter the target project name (in WORKSPACE_NAME/PROJECT_NAME format): ").strip().lower()
)
TARGET_PROJECT = input(
"Enter the target project name (in WORKSPACE_NAME/PROJECT_NAME format): "
).strip()

# %% API Tokens
SOURCE_TOKEN = getpass("Enter your API token for the source workspace: ")
Expand Down
8 changes: 2 additions & 6 deletions utils/migration_tools/from_wandb/wandb_to_neptune.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,15 @@
wandb_entity = (
input(
f"Enter W&B entity name. Leave blank to use the default entity ({client.default_entity}): "
)
.strip()
.lower()
).strip()
or client.default_entity
)

default_neptune_workspace = os.getenv("NEPTUNE_PROJECT").split("/")[0]
neptune_workspace = (
input(
f"Enter Neptune workspace name. Leave blank to use the default workspace ({default_neptune_workspace}): "
)
.strip()
.lower()
).strip()
or default_neptune_workspace
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
default_project = os.getenv("NEPTUNE_PROJECT")
PROJECT = input(
f"Enter the project name (in WORKSPACE_NAME/PROJECT_NAME format). Leave empty to use the default project ({default_project}): "
).strip().lower() or os.getenv("NEPTUNE_PROJECT")
).strip() or os.getenv("NEPTUNE_PROJECT")

# %% Num Workers
NUM_WORKERS = input(
Expand Down

0 comments on commit 4325487

Please sign in to comment.