argilla [FEAT] 调整init方法中资源id的使用 ```markdown [FEAT] 调整init方法中资源id的使用 ```

yx2lnoni  于 25天前  发布在  其他
关注(0)|答案(1)|浏览(31)

对于用户和工作区,资源类将资源 id 作为 __init__ 方法的参数,但不适用于数据集。此外,我们还可以使用提供的 ID 从服务器获取资源。
我们应该为相同类型的类提供一致的行为:

  • 为 3 个主要资源 UserDatasetWorkspaces 允许 id 参数
  • 使用提供的 id 从服务器自动获取资源:
user = rg.User(id=<an_existing_user_id>).get()
assert user.username is not None
az31mfrm

az31mfrm1#

@burtenshaw Does it make sense to do it this? (not for v2 but as a standard way to work with resources)

相关问题