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

Drop support of the TFRecord format #7416

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Jan 31, 2024

Motivation and context

Usage statistics on app.cvat.ai show that this format is rarely used, with single-digit numbers of projects/tasks/jobs being exported or imported using this format. Moreover, TensorFlow's popularity appears to be shrinking, so I'm not expecting this format to make a comeback.

Meanwhile, supporting this format has a cost that has to be borne by everyone deploying CVAT, because it requires TensorFlow to be installed and loaded. This has various ill effects:

  1. Loading time is increased. In my testing, even a command as trivial as manage.py --help is slowed down by 3.6 seconds. This may not seem like much, but the effect is compounded, because we have multiple processes (server + workers) all loading the same codebase. Plus, the container entrypoint may execute several Django commands.

  2. Memory usage is increased. TensorFlow adds ~100MB of RAM usage per process with data alone; and the libraries add more (although it's hard to estimate the impact of library code, since it can be shared between processes in RAM).

  3. Docker image size is increased by ~1.5GB (when unpacked). This is more than half of the current total size! Building time is increased as well.

Overall, it seems that the drawbacks of keeping support for this format outweigh the benefits, so it's time to drop it.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@SpecLad SpecLad force-pushed the remove-tfrecord branch 2 times, most recently from d428cd7 to 7913565 Compare January 31, 2024 16:09
@SpecLad
Copy link
Contributor Author

SpecLad commented Jan 31, 2024

/check

Copy link
Contributor

github-actions bot commented Jan 31, 2024

✔️ All checks completed successfully
📄 See logs here

@azhavoro
Copy link
Contributor

azhavoro commented Feb 8, 2024

LGTM, could you resolve the conflict?

This can provide useful statistics on the use of this functionality.

Note that I chose to use the same scope for operations on projects,
tasks and jobs, because the import/export operations work more-or-less
the same on each of them and have the same parameters. It's still
possible to distinguish which type of object the operation was performed
on by examining the various `*_id` fields in the event.
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Merging #7416 (566205c) into develop (6260232) will decrease coverage by 0.02%.
Report is 3 commits behind head on develop.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7416      +/-   ##
===========================================
- Coverage    83.53%   83.51%   -0.02%     
===========================================
  Files          373      372       -1     
  Lines        39693    39666      -27     
  Branches      3718     3718              
===========================================
- Hits         33157    33128      -29     
- Misses        6536     6538       +2     
Components Coverage Δ
cvat-ui 79.38% <98.71%> (-0.03%) ⬇️
cvat-server 87.31% <96.29%> (-0.01%) ⬇️

@SpecLad
Copy link
Contributor Author

SpecLad commented Feb 19, 2024

LGTM, could you resolve the conflict?

Resolved.

@SpecLad SpecLad merged commit 7286d65 into cvat-ai:develop Feb 19, 2024
43 checks passed
@SpecLad SpecLad deleted the remove-tfrecord branch February 19, 2024 14:41
@cvat-bot cvat-bot bot mentioned this pull request Feb 23, 2024
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.

2 participants