Skip to content

Commit

Permalink
remove deprecation warnings in fetch_runs_table() (#1686)
Browse files Browse the repository at this point in the history
Co-authored-by: Szymon Sadkowski <szymon.sadkowski@neptune.ai>
  • Loading branch information
szysad and Szymon Sadkowski committed Mar 12, 2024
1 parent dd9ec01 commit 219432c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### Changes
- Improve dependency installation checking ([#1670](https://github.com/neptune-ai/neptune-client/pull/1670))
- Cache dependencies check ([#1675](https://github.com/neptune-ai/neptune-client/pull/1675))
- Remove deprecation warning in `fetch_runs_table()` ([#1686](https://github.com/neptune-ai/neptune-client/pull/1686))


## neptune 1.9.1
Expand Down
6 changes: 0 additions & 6 deletions src/neptune/metadata_containers/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from neptune.metadata_containers.abstract import NeptuneObjectCallback
from neptune.metadata_containers.utils import (
build_raw_query,
deprecated_func_arg_warning_check,
prepare_nql_query,
)
from neptune.table import Table
Expand Down Expand Up @@ -291,11 +290,6 @@ def fetch_runs_table(
https://docs.neptune.ai/api/project#fetch_runs_table
"""

deprecated_func_arg_warning_check("fetch_runs_table", "id", id)
deprecated_func_arg_warning_check("fetch_runs_table", "state", state)
deprecated_func_arg_warning_check("fetch_runs_table", "owner", owner)
deprecated_func_arg_warning_check("fetch_runs_table", "tag", tag)

if any((id, state, owner, tag)) and query is not None:
raise ValueError(
"You can't use the 'query' parameter together with the 'id', 'state', 'owner', or 'tag' parameters."
Expand Down
8 changes: 0 additions & 8 deletions src/neptune/metadata_containers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from datetime import datetime
from typing import (
Any,
Generator,
Iterable,
List,
Expand All @@ -31,7 +30,6 @@
)

from neptune.common.warnings import (
NeptuneDeprecationWarning,
NeptuneWarning,
warn_once,
)
Expand Down Expand Up @@ -175,12 +173,6 @@ def _parse_entry(entry: LeaderboardEntry) -> LeaderboardEntry:
return entry


def deprecated_func_arg_warning_check(fname: str, vname: str, var: Any) -> None:
if var is not None:
msg = f"""The argument '{vname}' of the function '{fname}' is deprecated and will be removed in the future."""
warn_once(msg, exception=NeptuneDeprecationWarning)


def build_raw_query(query: str, trashed: Optional[bool]) -> NQLQuery:
raw_nql = RawNQLQuery(query)

Expand Down

0 comments on commit 219432c

Please sign in to comment.