Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Discussion coming from #1489 .

@movchan74 asked:

Are there plans to support the extend method for DocVec in the future?

@JoanFM replied:

Hey @movchan74 ,

Let me try to answer the 2 questions:

If we want to add extend to DocVec. We are not so sure about this, DocVec is much more planned to be static in terms of size, and will be complex to provide a coherent list-like behavior. In past versions we tried to fit every pattern in a single type of object, and we now decided to clarify the interfaces. We believe it is better to do DocVec.to_doc_list, do the extension and then convert back. However, we welcome you to join our [discord channel](https://discord.gg/xBTCDPFs) to discuss this or any other design choices.

@samsja commented:

Here we want to be cautious about how we integrate an extended method on DocVec because extending on a DocVec will be slower that on a DocList (because of underlying implementation)

The way I see it we could either have:

1- extend as a method of DocVec that add the new DocVec to self
2- cat function like in torch/numpy that will fuse to DocVec into one

1 is more coherent with DocList. 2 is more intuitive and gives more insight into what is happening under the hood.

@movchan74 replied:

I think extend makes more sense to keep it consistent with DocList.

@JoanFM replied:

Our concern is that we wanted in purpose not to have consistency with DocList so that it is clear that they are different things and behave differently.

We have the impression that adding appends and extends support people will expect list-like behavior which we cannot ensure
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.