Skip to content

Commit

Permalink
[FEAT] improve notebook logging of log function (#5062)
Browse files Browse the repository at this point in the history
**Type of change**

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactor (change restructuring the codebase without changing
functionality)
- [x] Improvement (change adding some improvement to an existing
functionality)
- [ ] Documentation update

**How Has This Been Tested**

all integration tests pass

**Checklist**

- [ ] I added relevant documentation
- [ ] follows the style guidelines of this project
- [ ] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [ ] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Ben Burtenshaw <[email protected]>
Co-authored-by: Paco Aranda <[email protected]>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent e62028a commit 2f159eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion argilla/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ dynamic = ["version"]
dependencies = [
"httpx>=0.26.0",
"pydantic>=2.6.0, <3.0.0",
"argilla-v1[listeners]"
"argilla-v1[listeners]",
"tqdm>=4.60.0",
"rich>=10.0.0",
]

[project.optional-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions argilla/src/argilla/records/_dataset_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def log(
mapping: Optional[Dict[str, str]] = None,
user_id: Optional[UUID] = None,
batch_size: int = DEFAULT_BATCH_SIZE,
) -> List[Record]:
) -> "DatasetRecords":
"""Add or update records in a dataset on the server using the provided records.
If the record includes a known `id` field, the record will be updated.
If the record does not include a known `id` field, the record will be added as a new record.
Expand Down Expand Up @@ -253,7 +253,7 @@ def log(
level="info",
)

return created_or_updated
return self

def delete(
self,
Expand Down

0 comments on commit 2f159eb

Please sign in to comment.