Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added metadata_properties inside the __repr__ method in both remote and local folder #4192

Merged
merged 8 commits into from
Nov 13, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ These are the section headers that we use:

### Added

- Added `metadata_properties` to the `__repr__` method of the `FeedbackDataset` and `RemoteFeedbackDataset`.([#4192](https://github.com/argilla-io/argilla/pull/4192)).
- Added `show_progress` argument to `from_huggingface()` method to make the progress bar for parsing records process optional.([#4132](https://github.com/argilla-io/argilla/pull/4132)).
- Added a progress bar for parsing records process to `from_huggingface()` method with `trange` in `tqdm`.([#4132](https://github.com/argilla-io/argilla/pull/4132)).
- Added to sort by `inserted_at` or `updated_at` for datasets with no metadata. ([4147](https://github.com/argilla-io/argilla/pull/4147))
Expand Down
10 changes: 6 additions & 4 deletions src/argilla/client/feedback/dataset/local/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ def records(self) -> List["FeedbackRecord"]:

def __repr__(self) -> str:
"""Returns a string representation of the dataset."""
indent = " "
return (
"FeedbackDataset("
+ textwrap.indent(
f"\nfields={self.fields}\nquestions={self.questions}\nguidelines={self.guidelines})", " "
)
+ "\n)"
+ textwrap.indent(f"\nfields={self.fields}", indent)
+ textwrap.indent(f"\nquestions={self.questions}", indent)
+ textwrap.indent(f"\nguidelines={self.guidelines})", indent)
+ textwrap.indent(f"\nmetadata_properties={self.metadata_properties})", indent),
+"\n)",
)

def __len__(self) -> int:
Expand Down
3 changes: 2 additions & 1 deletion src/argilla/client/feedback/dataset/remote/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ def __repr__(self) -> str:
+ textwrap.indent(f"\nfields={self.fields}", indent)
+ textwrap.indent(f"\nquestions={self.questions}", indent)
+ textwrap.indent(f"\nguidelines={self.guidelines}", indent)
+ ")"
+ textwrap.indent(f"\nmetadata_properties={self.metadata_properties}", indent)
+ "\n)"
)

def __len__(self) -> int:
Expand Down