Repository: activeloopai/Hub
File: deeplake/core/vectorstore/deeplake_vectorstore.py (Python)

Code before:
            path,
            "vs.initialize",
            {
                "tensor_params": "default"
                if tensor_params is not None
                else tensor_params,
                "embedding_function": True if embedding_function is not None else False,
                "num_workers": num_workers,
                "overwrite": overwrite,
                "read_only": read_only,
                "ingestion_batch_size": ingestion_batch_size,
                "exec_option": exec_option,
                "token": token,
                "verbose": verbose,
                "runtime": runtime,
            },
            token=token,
        )

        self.ingestion_batch_size = ingestion_batch_size
        self.num_workers = num_workers

        creds = {}
        if "creds" in kwargs:
            creds = {"creds": kwargs["creds"]}
            del kwargs["creds"]

        self.dataset = dataset_utils.create_or_load_dataset(
            tensor_params,
            path,
            token,
            creds,
            logger,
            read_only,
            exec_option,
            embedding_function,
            overwrite,
            runtime,
            **kwargs,
        )
        self.embedding_function = embedding_function
        self.exec_option = exec_option
        self.verbose = verbose
        self.tensor_params = tensor_params

    def add(
        self,
        embedding_function: Optional[Union[Callable, List[Callable]]] = None,
        embedding_data: Optional[Union[List, List[List]]] = None,
        embedding_tensor: Optional[Union[str, List[str]]] = None,
        total_samples_processed: int = 0,

Review comment (suggestion):
Can we replace this with:
```suggestion
        creds = {}
        if "creds" in kwargs:
            creds = {"creds": kwargs.pop("creds")}
```

Code after:

        Danger:
            Setting ``overwrite`` to ``True`` will delete all of your data if the Vector Store exists! Be very careful when setting this parameter.
        """
        feature_report_path(
            path,
            "vs.initialize",
            {
                "tensor_params": "default"
                if tensor_params is not None
                else tensor_params,
                "embedding_function": True if embedding_function is not None else False,
                "num_workers": num_workers,
                "overwrite": overwrite,
                "read_only": read_only,
                "ingestion_batch_size": ingestion_batch_size,
                "exec_option": exec_option,
                "token": token,
                "verbose": verbose,
                "runtime": runtime,
            },
            token=token,
        )

        self.ingestion_batch_size = ingestion_batch_size
        self.num_workers = num_workers

        if creds is None:
            creds = {}

        self.dataset = dataset_utils.create_or_load_dataset(
            tensor_params,
            path,
            token,
            creds,
            logger,
            read_only,
            exec_option,
            embedding_function,
            overwrite,
            runtime,
            **kwargs,
        )
        self.embedding_function = embedding_function
        self.exec_option = utils.parse_exec_option(
            self.dataset, exec_option, _INDRA_INSTALLED
        )
        self.verbose = verbose
        self.tensor_params = tensor_params

    def add(