Ejemplo n.º 1
0
    def pop(self, path: str, wait: bool = False) -> None:
        """Removes the field or whole namespace stored under the path completely and all data associated with them.

        Args:
            path (str): Path of the field or namespace to be removed.
            wait (bool, optional): If `True` the client will first wait to send all tracked metadata to the server.
                This makes the call synchronous. Defaults to `False`.

        Examples:
            >>> import neptune.new as neptune
            >>> project = neptune.init_project(name="MY_WORKSPACE/MY_PROJECT")

            >>> # Delete a field along with it's data
            ... project.pop("datasets/v0.4")

            >>> # .pop() can be invoked directly on fields and namespaces

            >>> project['parameters/learning_rate'] = 0.3

            >>> # Following line
            ... project.pop("datasets/v0.4")
            >>> # is equiavlent to this line
            ... project["datasets/v0.4"].pop()
            >>> # or this line
            ... project["datasets"].pop("v0.4")

            >>> # You can also delete in batch whole namespace
            ... project["datasets"].pop()

        You may also want to check `pop docs page`_.

        .. _pop docs page:
           https://docs.neptune.ai/api-reference/project#.pop
        """
        return AttributeContainer.pop(self, path=path, wait=wait)
Ejemplo n.º 2
0
    def pop(self, path: str, wait: bool = False) -> None:
        """Removes the field stored under the path completely and all data associated with it.

        Args:
            path (str): Path of the field to be removed.
            wait (bool, optional): If `True` the client will first wait to send all tracked metadata to the server.
                This makes the call synchronous. Defaults to `True`.

        Examples:
            >>> import neptune.new as neptune
            >>> run = neptune.init()

            >>> run['parameters/learninggg_rata'] = 0.3

            >>> # Delete a field along with it's data
            ... run.pop('parameters/learninggg_rata')

            >>> run['parameters/learning_rate'] = 0.3

            >>> # Training finished
            ... run['trained_model'].upload('model.pt')
            >>> # 'model_checkpoint' is a File field
            ... run.pop('model_checkpoint')

        You may also want to check `pop docs page`_.

        .. _pop docs page:
           https://docs.neptune.ai/api-reference/run#.pop
        """
        return AttributeContainer.pop(self, path=path, wait=wait)