Is your feature request related to a problem? Please describe.
We currently have two ways through which the owner for a to-be-uploaded artifact can be set: You can either specify the owner parameter in the upload_to_hub() method (which takes precedent) or you can set the owner attribute. See for example here. This can lead to confusing behavior as the dataset you upload may be associated with a different owner on the Hub then it does locally.
Describe the solution you'd like
After uploading a dataset to the Hub, the owner associated with that dataset on the Hub is the same as the owner associated with that same, just uploaded dataset locally.
Describe alternatives you've considered
I considered four different options to achieve this, none of which are perfect.
As a side-effect of the upload method, overwrite the owner attribute of the artifact.
This side-effect may be equally confusing
Drop the owner parameter in the upload method. Rather require the owner attribute to be set.
This changes the API, specifically the code example we have used in several presentations, social posts and tutorials.
Remove the owner attribute from the artifact and require the use of the owner parameter in the upload method.
We need to know the owner for an artifact, specifically in the PolarisFileSystem class.
Is your feature request related to a problem? Please describe.
We currently have two ways through which the
owner
for a to-be-uploaded artifact can be set: You can either specify theowner
parameter in theupload_to_hub()
method (which takes precedent) or you can set theowner
attribute. See for example here. This can lead to confusing behavior as the dataset you upload may be associated with a different owner on the Hub then it does locally.Describe the solution you'd like
After uploading a dataset to the Hub, the owner associated with that dataset on the Hub is the same as the owner associated with that same, just uploaded dataset locally.
Describe alternatives you've considered
I considered four different options to achieve this, none of which are perfect.
owner
attribute of the artifact.owner
parameter in the upload method. Rather require theowner
attribute to be set.owner
attribute from the artifact and require the use of theowner
parameter in the upload method.PolarisFileSystem
class.Additional context
See https://github.com/polaris-hub/polaris/pull/186#discussion_r1745632152