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

chore: added telemetry to ArgillaTrainer #3336

Conversation

davidberenstein1957
Copy link
Member

@davidberenstein1957 davidberenstein1957 commented Jul 4, 2023

Description

  • moved argilla.server.commons.telemetry to argilla.utils.telemetry
  • added telemetry to ArgillaTrainer for Framework and NLP-task

Closes #3325

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

N.A.

Checklist

N.A.

@davidberenstein1957 davidberenstein1957 linked an issue Jul 4, 2023 that may be closed by this pull request
@alvarobartt
Copy link
Member

Before tackling this I guess we should talk about whether adding telemetry in the Python client side is something we want to do @frascuchon, as for now we just have that in the API

@davidberenstein1957
Copy link
Member Author

I briefly discussed this with @frascuchon and @dvsrepo before. For me it makes sense to do so in order to keep track of integrations like the trainer and the callbacks/plugins.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (e936512) 90.45% compared to head (5e9c410) 90.47%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3336      +/-   ##
===========================================
+ Coverage    90.45%   90.47%   +0.01%     
===========================================
  Files          239      239              
  Lines        12828    12834       +6     
===========================================
+ Hits         11604    11611       +7     
+ Misses        1224     1223       -1     
Impacted Files Coverage Δ
src/argilla/feedback/__init__.py 100.00% <ø> (ø)
src/argilla/utils/telemetry.py 89.09% <ø> (ø)
src/argilla/client/feedback/training/base.py 88.40% <100.00%> (+0.17%) ⬆️
src/argilla/server/apis/v0/handlers/users.py 100.00% <100.00%> (ø)
src/argilla/server/apis/v1/handlers/datasets.py 100.00% <100.00%> (ø)
src/argilla/server/errors/api_errors.py 100.00% <100.00%> (ø)
src/argilla/server/services/storage/service.py 100.00% <100.00%> (ø)
src/argilla/training/base.py 97.22% <100.00%> (+0.13%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

chore: used get_telemetry_client method
@davidberenstein1957 davidberenstein1957 marked this pull request as ready for review July 5, 2023 13:50
@davidberenstein1957
Copy link
Member Author

@frascuchon I opted for moving telemetry to argilla.utils instead of creating another commons directory just for telemetry.

Copy link
Member

@frascuchon frascuchon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!!

I've included some comments

Also, maybe the changes referring to the training import issue should be removed, or wait to merge first #3346 ?

@davidberenstein1957
Copy link
Member Author

@frascuchon I assumed #3346 would be resolved during the patch.

@davidberenstein1957 davidberenstein1957 merged commit dca69cc into develop Jul 6, 2023
@davidberenstein1957 davidberenstein1957 deleted the feat/3325-feature-add-telemetry-to-the-argillatrainer branch July 6, 2023 10:15
leiyre pushed a commit that referenced this pull request Jul 6, 2023
* develop:
  feat: disable concurrency tests GitHub (#3355)
  feat: improve protected fields (#3342)
  chore: added telemetry to ArgillaTrainer (#3336)
  Feat/update start page code (#3327)
  [DOCS] Added information about tests in developer documentation (#3147)

# Conflicts:
#	docs/_source/_common/snippets/start_page.md
#	frontend/components/commons/datasets-list/DatasetsEmpty.vue
leiyre pushed a commit that referenced this pull request Jul 6, 2023
* develop:
  feat: disable concurrency tests GitHub (#3355)
  feat: improve protected fields (#3342)
  chore: added telemetry to ArgillaTrainer (#3336)
  Feat/update start page code (#3327)
  [DOCS] Added information about tests in developer documentation (#3147)

# Conflicts:
#	docs/_source/_common/snippets/start_page.md
#	frontend/components/commons/datasets-list/DatasetsEmpty.vue
frascuchon added a commit that referenced this pull request Jul 27, 2023
# Description

This PRs fixes the `ModuleNotFoundError` and `ImportError` that occurred
when trying to import something from `argilla.feedback` module.

The first error was caused because in #3336 the telemetry was included
in the `ArgillaTrainer`, but in the `argilla.utils.telemetry` module
some optional dependencies used by the server were being imported.

The second one was caused because the module in which
`HuggingFaceDatasetMixin` (and from which `FeedbackDataset` is
inheriting) class lives was importing classes from the
`argilla.client.feedback.config` module, which was importing `pyyaml` in
its root causing the `ImportError`.

Closes #3468 

**Type of change**

- [x] Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**

I've created a wheel of this branch, installed in a new virtual
environment and I was able to import something `argilla.feedback` module
without errors.

**Checklist**

- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] 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)
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Francisco Aranda <francis@argilla.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] add telemetry to the ArgillaTrainer
3 participants