Skip to content

Commit

Permalink
Minor package refactors (#1784)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raalsky authored May 28, 2024
1 parent 1f4f371 commit 36b72a1
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 49 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,16 @@ module = [
"neptune.internal.hardware.gpu.gpu_monitor",
"neptune.internal.hardware.hardware_metric_reporting_job",
"neptune.internal.id_formats",
"neptune.internal.notebooks.comm",
"neptune.internal.notebooks.notebooks",
"neptune.internal.init.model",
"neptune.internal.init.model_version",
"neptune.internal.init.project",
"neptune.internal.init.run",
"neptune.internal.operation",
"neptune.internal.streams.std_capture_background_job",
"neptune.internal.streams.std_stream_capture_logger",
"neptune.internal.threading.daemon",
"neptune.internal.daemon",
"neptune.internal.utils.deprecation",
"neptune.internal.utils.generic_attribute_mapper",
"neptune.internal.utils.git",
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/api/searching_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
NQLQueryAttribute,
)
from neptune.internal.backends.utils import construct_progress_bar
from neptune.internal.init.parameters import MAX_SERVER_OFFSET
from neptune.internal.parameters import MAX_SERVER_OFFSET
from neptune.typing import ProgressBarType

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os

from neptune.envs import NEPTUNE_SYNC_AFTER_STOP_TIMEOUT
from neptune.internal.init.parameters import DEFAULT_STOP_TIMEOUT
from neptune.internal.parameters import DEFAULT_STOP_TIMEOUT

STOP_QUEUE_STATUS_UPDATE_FREQ_SECONDS = 30.0
STOP_QUEUE_MAX_TIME_NO_CONNECTION_SECONDS = float(os.getenv(NEPTUNE_SYNC_AFTER_STOP_TIMEOUT, DEFAULT_STOP_TIMEOUT))
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

from neptune.core.operation_processors.async_operation_processor.processing_resources import ProcessingResources
from neptune.core.operations.operation import Operation
from neptune.internal.daemon import Daemon
from neptune.internal.signals_processing.utils import (
signal_batch_lag,
signal_batch_processed,
signal_batch_started,
)
from neptune.internal.threading.daemon import Daemon


class ConsumerThread(Daemon):
Expand Down
File renamed without changes.
15 changes: 0 additions & 15 deletions src/neptune/internal/init/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@
from neptune.core.operation_processors.operation_processor import OperationProcessor
from neptune.envs import NEPTUNE_SYNC_AFTER_STOP_TIMEOUT
from neptune.exceptions import NeptuneSynchronizationAlreadyStoppedException
from neptune.internal.daemon import Daemon
from neptune.internal.exceptions import NeptuneException
from neptune.internal.init.parameters import DEFAULT_STOP_TIMEOUT
from neptune.internal.operation import Operation
from neptune.internal.operation_processors.operation_logger import ProcessorStopLogger
from neptune.internal.operation_processors.utils import (
common_metadata,
get_container_full_path,
)
from neptune.internal.parameters import DEFAULT_STOP_TIMEOUT
from neptune.internal.signals_processing.utils import (
signal_batch_lag,
signal_batch_processed,
signal_batch_started,
)
from neptune.internal.threading.daemon import Daemon
from neptune.internal.utils.disk_utilization import ensure_disk_not_overutilize
from neptune.internal.utils.logger import get_logger
from neptune.internal.warnings import (
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/neptune/internal/signals_processing/signals_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
Optional,
)

from neptune.internal.init.parameters import IN_BETWEEN_CALLBACKS_MINIMUM_INTERVAL
from neptune.internal.daemon import Daemon
from neptune.internal.parameters import IN_BETWEEN_CALLBACKS_MINIMUM_INTERVAL
from neptune.internal.signals_processing.signals import (
BatchLagSignal,
SignalsVisitor,
)
from neptune.internal.threading.daemon import Daemon

if TYPE_CHECKING:
from neptune.internal.signals_processing.signals import Signal
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/internal/streams/std_stream_capture_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from queue import Queue
from typing import TextIO

from neptune.internal.threading.daemon import Daemon
from neptune.internal.daemon import Daemon
from neptune.objects import NeptuneObject


Expand Down
15 changes: 0 additions & 15 deletions src/neptune/internal/threading/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/neptune/internal/utils/ping_background_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)

from neptune.internal.background_job import BackgroundJob
from neptune.internal.threading.daemon import Daemon
from neptune.internal.daemon import Daemon
from neptune.internal.utils.logger import get_logger

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
SYSTEM_FAILED_ATTRIBUTE_PATH,
)
from neptune.internal.background_job import BackgroundJob
from neptune.internal.threading.daemon import Daemon
from neptune.internal.daemon import Daemon
from neptune.internal.utils import process_killer
from neptune.internal.utils.logger import get_logger
from neptune.internal.websockets.reconnecting_websocket import ReconnectingWebsocket
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/objects/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from neptune.internal.container_type import ContainerType
from neptune.internal.exceptions import NeptuneException
from neptune.internal.id_formats import QualifiedName
from neptune.internal.init.parameters import (
from neptune.internal.parameters import (
ASYNC_LAG_THRESHOLD,
ASYNC_NO_PROGRESS_THRESHOLD,
DEFAULT_FLUSH_PERIOD,
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/objects/model_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from neptune.internal.container_type import ContainerType
from neptune.internal.exceptions import NeptuneException
from neptune.internal.id_formats import QualifiedName
from neptune.internal.init.parameters import (
from neptune.internal.parameters import (
ASYNC_LAG_THRESHOLD,
ASYNC_NO_PROGRESS_THRESHOLD,
DEFAULT_FLUSH_PERIOD,
Expand Down
6 changes: 3 additions & 3 deletions src/neptune/objects/neptune_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
UniqueId,
conform_optional,
)
from neptune.internal.init.parameters import (
from neptune.internal.operation import DeleteAttribute
from neptune.internal.operation_processors.factory import get_operation_processor
from neptune.internal.parameters import (
ASYNC_LAG_THRESHOLD,
ASYNC_NO_PROGRESS_THRESHOLD,
DEFAULT_FLUSH_PERIOD,
)
from neptune.internal.operation import DeleteAttribute
from neptune.internal.operation_processors.factory import get_operation_processor
from neptune.internal.signals_processing.background_job import CallbacksMonitor
from neptune.internal.state import ContainerState
from neptune.internal.utils import (
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/objects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from neptune.internal.backends.api_model import ApiExperiment
from neptune.internal.container_type import ContainerType
from neptune.internal.exceptions import NeptuneException
from neptune.internal.init.parameters import (
from neptune.internal.parameters import (
ASYNC_LAG_THRESHOLD,
ASYNC_NO_PROGRESS_THRESHOLD,
DEFAULT_FLUSH_PERIOD,
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/objects/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from neptune.internal.backends.api_model import ApiExperiment
from neptune.internal.container_type import ContainerType
from neptune.internal.id_formats import QualifiedName
from neptune.internal.init.parameters import (
from neptune.internal.parameters import (
ASYNC_LAG_THRESHOLD,
ASYNC_NO_PROGRESS_THRESHOLD,
DEFAULT_FLUSH_PERIOD,
Expand Down
2 changes: 1 addition & 1 deletion src/neptune/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Union,
)

from neptune.internal.init.parameters import DEFAULT_STOP_TIMEOUT
from neptune.internal.parameters import DEFAULT_STOP_TIMEOUT
from neptune.internal.types.stringify_value import StringifyValue
from neptune.internal.utils.logger import get_logger
from neptune.typing import ProgressBarCallback
Expand Down

0 comments on commit 36b72a1

Please sign in to comment.