polaris-hub / polaris

Foster the development of impactful AI models in drug discovery.
https://polaris-hub.github.io/polaris/
Apache License 2.0
82 stars 4 forks source link

Rethink how the owner for an artifact is specified #192

Open cwognum opened 3 weeks ago

cwognum commented 3 weeks ago

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.

  1. As a side-effect of the upload method, overwrite the owner attribute of the artifact.
    • This side-effect may be equally confusing
  2. 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.
  3. 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.

Additional context

See https://github.com/polaris-hub/polaris/pull/186#discussion_r1745632152