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

Change Grid from ontology to a data structure in core.py #876

Merged
merged 23 commits into from
Jul 25, 2022
Merged

Change Grid from ontology to a data structure in core.py #876

merged 23 commits into from
Jul 25, 2022

Conversation

hepengfe
Copy link
Collaborator

This PR fixes #817.

Description of changes

  • change Grids -> Grid and move it to core.py as a data structure rather than an ontology
    • dealing edge cases of residual grid cells(last grid cells per row/column). We use the image size as upper bound for these grid cells so they might be smaller than regular grid cells.

Possible influences of this PR.

Describe what are the possible side-effects of the code change.

Test Conducted

Describe what test cases are included for the PR.

@hepengfe hepengfe self-assigned this Jul 12, 2022
@hepengfe hepengfe added topic:cv topic: ontology All issues related to ontologies in core, top and base_ontology topic: data Issue about data loader modules and data processing related and removed topic: ontology All issues related to ontologies in core, top and base_ontology labels Jul 12, 2022
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #876 (9d7824d) into master (12152dc) will increase coverage by 0.01%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master     #876      +/-   ##
==========================================
+ Coverage   80.84%   80.85%   +0.01%     
==========================================
  Files         254      254              
  Lines       19444    19460      +16     
==========================================
+ Hits        15719    15734      +15     
- Misses       3725     3726       +1     
Impacted Files Coverage Δ
forte/data/data_store.py 93.51% <ø> (ø)
forte/data/entry_converter.py 82.89% <ø> (-0.44%) ⬇️
forte/data/ontology/top.py 77.87% <ø> (+<0.01%) ⬆️
forte/data/ontology/core.py 76.77% <76.08%> (-0.15%) ⬇️
forte/data/data_pack.py 85.49% <100.00%> (-0.03%) ⬇️
tests/forte/grid_test.py 100.00% <100.00%> (ø)
forte/pipeline.py 92.53% <0.00%> (+0.21%) ⬆️
forte/data/ontology/ontology_code_const.py 100.00% <0.00%> (+1.53%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
@hepengfe hepengfe changed the title Grid improve2 Change Grid from ontology to a data structure in core.py Jul 13, 2022
forte/data/data_pack.py Outdated Show resolved Hide resolved
forte/data/data_pack.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
tests/forte/grids_test.py Outdated Show resolved Hide resolved
@hepengfe hepengfe marked this pull request as ready for review July 19, 2022 18:02
Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

Some minor comments on this. Btw, where would the functionality: grid as index for fast overlap computation be implemented? I think that's the actual reason of using grid.

forte/data/ontology/core.py Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Outdated Show resolved Hide resolved
forte/data/data_pack.py Outdated Show resolved Hide resolved
forte/data/ontology/core.py Show resolved Hide resolved
@mylibrar mylibrar merged commit 8a61272 into asyml:master Jul 25, 2022
@hepengfe hepengfe deleted the grid_improve2 branch July 25, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:cv topic: data Issue about data loader modules and data processing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Grid Ontology Design
3 participants