-
Notifications
You must be signed in to change notification settings - Fork 263
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
Fix setup commands #47
Conversation
script/formatting/formatter.py
Outdated
for dir in DEFAULT_DIRS: | ||
LOG.info("Scanning : " + dir + "\n\n") | ||
|
||
# LOG.info("Stripping headers : " + dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for having this commented code?
Can we remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommented the code.
def bootstrap_catalog(self): | ||
|
||
eva_dir = ConfigurationManager().get_value("core", "location") | ||
output_url = os.path.join(eva_dir, CATALOG_DIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't catalog_dir_url and output_url the same?
output_url is only being for logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up this code.
There is an issue with converting file paths to urls like:
/tmp/eva_datsets
to file:///tmp/eva_datasets
I am not sure if this is the correct solution (with urlparse).
src/catalog/catalog_manager.py
Outdated
# Create catalog if it does not exist | ||
else: | ||
|
||
print("Catalog not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace this with logger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger output is not visible by default in test cases. We will have to figure out why that is the case.
We should also add a validator.py
to remove all the print
functions.
src/catalog/dataset_df.py
Outdated
dataset_id = 0 | ||
else: | ||
max_id = dataset_df.agg({"dataset_id": "max"}).collect()[0][0] | ||
print(max_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace print with logger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need fix up the logger. We will also need to couple it with Spark's logger (log4j) eventually.
src/catalog/dataset_df.py
Outdated
|
||
spark.createDataFrame(rows_rdd, | ||
petastorm_schema.as_spark_schema()) \ | ||
.coalesce(1) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be storing data into multiple partitions?
If we assuming that the dataset dataframe is small in size (few 100 records) then this should bee fine. For larger dataset sizes this will not be efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. we should. How do we do that?
self._is_nullable = is_nullable | ||
self._array_dimensions = array_dimensions | ||
|
||
def get_name(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use @Property for getters instead of get_*
dtype=np.uint8, size=(H, W, C))} | ||
|
||
|
||
class FrameLoader(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need to rewrite this for generic scenarios. Even the corresponding test cases are yet to be written, currently, they are just placeholders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are just placeholders.
script/formatting/formatter.py
Outdated
# CONFIGURATION | ||
# ============================================== | ||
|
||
# NOTE: absolute path to peloton directory is calculated from current directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes to the comments. Replace peleton with Eva.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
dtype=np.uint8, size=(H, W, C))} | ||
|
||
|
||
class FrameLoader(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need to rewrite this for generic scenarios. Even the corresponding test cases are yet to be written, currently, they are just placeholders
src/catalog/catalog_manager.py
Outdated
|
||
dataset_file_url = os.path.join(catalog_dir_url, DATASET_FILE) | ||
dataset_df = load_dataset_df(dataset_file_url) | ||
dataset_df.show(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed.
src/catalog/dataset_df.py
Outdated
def get_dataset_df_schema(): | ||
|
||
column_1 = Column("dataset_id", ColumnType.INTEGER, False) | ||
column_2 = Column("dataset_name", ColumnType.INTEGER, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be ColumnType.STRING
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct. Fixed.
src/catalog/dataset_df.py
Outdated
spark = Session().get_session() | ||
Session().get_context() | ||
|
||
row_1 = [dataset_id, dataset_id * 500] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand the logic behind 500?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created some dummy data.
test/catalog/test_schema.py
Outdated
|
||
schema = Schema(schema_name, | ||
[column_1, column_2, column_3]) | ||
print(schema) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete test case. Didn't actually test anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, didn't do any programmatic testing. Added a simple test.
* Add object size to the bounding box Remove script from Dockerfile Fix framerate command Move default value for framerate update dockerfile dockerfile changes Add person_area label to surrounding box Update dockerfile ffmpeg config bug Add `person_area` label to `best_person` frame Resolve debug view showing area label for non-persons Add object size to the bounding box Add object size to the bounding box * Move object area outside of conditional to work with all object types
Bumps [sphinx-sitemap](https://github.com/jdillard/sphinx-sitemap) from 2.2.0 to 2.5.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jdillard/sphinx-sitemap/releases">sphinx-sitemap's releases</a>.</em></p> <blockquote> <h2>Release 2.5.0 (2023-01-28)</h2> <p>Install from <a href="https://pypi.org/project/sphinx-sitemap/2.5.0/">PyPi</a></p> <h2>What's Changed</h2> <ul> <li>:books: DOCS: Calculate version for sitemap based on current tag by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/53">jdillard/sphinx-sitemap#53</a></li> <li>:wrench: MAINT: Add changelog to <code>project.urls</code> by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/54">jdillard/sphinx-sitemap#54</a></li> <li>:test_tube: TESTS: Add Sphinx 6 environment to tox by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/55">jdillard/sphinx-sitemap#55</a></li> <li>:sparkles: NEW: Add support for Sphinx config <code>html_file_suffix</code> by <a href="https://github.com/jdetaeye"><code>@jdetaeye</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/57">jdillard/sphinx-sitemap#57</a></li> <li>:books: DOCS: Add site search optimization by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/58">jdillard/sphinx-sitemap#58</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/jdetaeye"><code>@jdetaeye</code></a> made their first contribution in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/57">jdillard/sphinx-sitemap#57</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jdillard/sphinx-sitemap/compare/v2.4.0...v2.5.0">https://github.com/jdillard/sphinx-sitemap/compare/v2.4.0...v2.5.0</a></p> <h2>Release 2.4.0 (2022-12-26)</h2> <p>Install from <a href="https://pypi.org/project/sphinx-sitemap/2.4.0/">PyPi</a></p> <h2>What's Changed</h2> <ul> <li>:test_tube: TESTS: Add python 3.11 tests by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/43">jdillard/sphinx-sitemap#43</a></li> <li>:books: DOCS: Add ReadTheDocs docs by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/45">jdillard/sphinx-sitemap#45</a></li> <li>:wrench: MAINT: General code clean up by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/46">jdillard/sphinx-sitemap#46</a></li> <li>:sparkles: NEW: Add support for parallel mode by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/47">jdillard/sphinx-sitemap#47</a></li> <li>:test_tube: TESTS: Add tests for dirhtml builder by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/48">jdillard/sphinx-sitemap#48</a></li> <li>:books: DOCS: Add vale support for docs by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/49">jdillard/sphinx-sitemap#49</a></li> <li>:bug: FIX: Fix wheel includes so they don't include docs and tests by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/51">jdillard/sphinx-sitemap#51</a></li> <li>:books: DOCS: Add write-good and improve writing by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/52">jdillard/sphinx-sitemap#52</a></li> </ul> <p>Shout-out to <a href="https://github.com/xmo-odoo"><code>@xmo-odoo</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/issues/47">#47</a></p> <p><strong>Full Changelog</strong>: <a href="https://github.com/jdillard/sphinx-sitemap/compare/v2.3.0...v2.4.0">https://github.com/jdillard/sphinx-sitemap/compare/v2.3.0...v2.4.0</a></p> <h2>Release 2.3.0 (2022-12-21)</h2> <p>Install from <a href="https://pypi.org/project/sphinx-sitemap/2.3.0/">PyPi</a></p> <h2>What's Changed</h2> <ul> <li>:wrench: MAINT: Clean up how package versions are handled by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/34">jdillard/sphinx-sitemap#34</a></li> <li>:wrench: MAINT: Install pre-commit with isort, black, and flake8 by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/35">jdillard/sphinx-sitemap#35</a></li> <li>:books: DOCS: Improve the wording of the README by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/36">jdillard/sphinx-sitemap#36</a></li> <li>:bug: FIX: Follow correct format for multilingual sitemaps by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/38">jdillard/sphinx-sitemap#38</a></li> <li>:wrench: MAINT: Update the build process and provide wheels by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/39">jdillard/sphinx-sitemap#39</a></li> <li>:wrench: MAINT: Add testing infrastructure by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/41">jdillard/sphinx-sitemap#41</a></li> <li>:wrench: MAINT: Add python 3.10 tests and remove flake8 test from tox by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/42">jdillard/sphinx-sitemap#42</a></li> <li>:bug: FIX: Use logging for all logging messages by <a href="https://github.com/jdillard"><code>@jdillard</code></a> in <a href="https://redirect.github.com/jdillard/sphinx-sitemap/pull/40">jdillard/sphinx-sitemap#40</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jdillard/sphinx-sitemap/compare/v2.2.1...v2.3.0">https://github.com/jdillard/sphinx-sitemap/compare/v2.2.1...v2.3.0</a></p> <h2>Release 2.2.1 (2022-11-11)</h2> <p>Install from <a href="https://pypi.org/project/sphinx-sitemap/2.2.1/">PyPi</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jdillard/sphinx-sitemap/blob/master/CHANGELOG.rst">sphinx-sitemap's changelog</a>.</em></p> <blockquote> <h2>2.5.0</h2> <p><em>Release date: 2023-01-28</em></p> <ul> <li>|:books:| DOCS: Calculate version for sitemap based on current tag <code>[#53](jdillard/sphinx-sitemap#53) <https://github.com/jdillard/sphinx-sitemap/pull/53></code>_</li> <li>|:test_tube:| TESTS: Add Sphinx 6 env to tox <code>[#55](jdillard/sphinx-sitemap#55) <https://github.com/jdillard/sphinx-sitemap/pull/55></code>_</li> <li>|:sparkles:| NEW: Add support for Sphinx config "html_file_suffix" <code>[#57](jdillard/sphinx-sitemap#57) <https://github.com/jdillard/sphinx-sitemap/pull/57></code>_</li> <li>|:books:| DOCS: Add site search optimization <code>[#58](jdillard/sphinx-sitemap#58) <https://github.com/jdillard/sphinx-sitemap/pull/58></code>_</li> </ul> <h2>2.4.0</h2> <p><em>Release date: 2022-12-26</em></p> <ul> <li>|:books:| DOCS: Add ReadTheDocs docs <code>[#45](jdillard/sphinx-sitemap#45) <https://github.com/jdillard/sphinx-sitemap/pull/45></code>_</li> <li>|:wrench:| MAINT: General code clean up <code>[#46](jdillard/sphinx-sitemap#46) <https://github.com/jdillard/sphinx-sitemap/pull/46></code>_</li> <li>|:sparkles:| NEW: Add support for parallel mode <code>[#47](jdillard/sphinx-sitemap#47) <https://github.com/jdillard/sphinx-sitemap/pull/47></code>_</li> <li>|:test_tube:| TESTS: Add tests for <code>dirhtml</code> builder <code>[#48](jdillard/sphinx-sitemap#48) <https://github.com/jdillard/sphinx-sitemap/pull/48></code>_</li> <li>|:test_tube:| TESTS: Add vale support for docs <code>[#49](jdillard/sphinx-sitemap#49) <https://github.com/jdillard/sphinx-sitemap/pull/49></code>_</li> <li>|:bug:| FIX: Fix wheel includes so they don't include docs and tests <code>[#51](jdillard/sphinx-sitemap#51) <https://github.com/jdillard/sphinx-sitemap/pull/51></code>_</li> <li>|:books:| DOCS: Add write-good and improve writing <code>[#52](jdillard/sphinx-sitemap#52) <https://github.com/jdillard/sphinx-sitemap/pull/52></code>_</li> </ul> <h2>2.3.0</h2> <p><em>Release date: 2022-12-21</em></p> <ul> <li>|:wrench:| MAINT: Clean up how package versions are handled</li> <li>|:test_tube:| TESTS: Install pre-commit with <code>isort</code>, <code>black</code>, and <code>flake8</code> <code>[#35](jdillard/sphinx-sitemap#35) <https://github.com/jdillard/sphinx-sitemap/pull/35></code>_</li> <li>|:books:| DOCS: Improve the wording of the README to help with issues upgrading to Sphinx 5 <code>[#36](jdillard/sphinx-sitemap#36) <https://github.com/jdillard/sphinx-sitemap/pull/36></code>_</li> <li>|:bug:| FIX: Follow correct format for multilingual sitemaps <code>[#38](jdillard/sphinx-sitemap#38) <https://github.com/jdillard/sphinx-sitemap/pull/38></code>_</li> <li>|:wrench:| MAINT: Update the build process <code>[#39](jdillard/sphinx-sitemap#39) <https://github.com/jdillard/sphinx-sitemap/pull/39></code>_</li> <li>|:test_tube:| TESTS: Add testing infrastructure <code>[#41](jdillard/sphinx-sitemap#41) <https://github.com/jdillard/sphinx-sitemap/pull/41></code>_</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/7ec6ccc443df9b5565e68b3f21ff2f597ca14e19"><code>7ec6ccc</code></a> Bump version to 2.5.0</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/f6c998c41ffeb15f956e587f7ec4451bd83a84b4"><code>f6c998c</code></a> DOCS: Add site search optimization (<a href="https://redirect.github.com/jdillard/sphinx-sitemap/issues/58">#58</a>)</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/8eff853b7623c8d911e9e9604b8c0eb56804963b"><code>8eff853</code></a> Update changelog</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/d00702d0043130327fb051c1487979eddf9b6367"><code>d00702d</code></a> Add test for html_file_suffix</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/06450ac9e6ea219c46201bc90edeb94d5e47789f"><code>06450ac</code></a> NEW: Add support for Sphinx config "html_file_suffix". (<a href="https://redirect.github.com/jdillard/sphinx-sitemap/issues/57">#57</a>)</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/edf8c48339b6fe56ed2738298303e4ca4b997970"><code>edf8c48</code></a> Be more explicit with python version classifiers</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/c8f29ee03e6d0d0b952e4a2c9a3975fef26837b0"><code>c8f29ee</code></a> TESTS: Add Sphinx 6 env to tox (<a href="https://redirect.github.com/jdillard/sphinx-sitemap/issues/55">#55</a>)</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/382be2a6fef956e42e6ba7705f12552d72c72eb7"><code>382be2a</code></a> MAINT: Add changelog to project.urls (<a href="https://redirect.github.com/jdillard/sphinx-sitemap/issues/54">#54</a>)</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/8ca21a916cda43ddf1607b641a2550627b383314"><code>8ca21a9</code></a> DOCS: Improve wording and filenames</li> <li><a href="https://github.com/jdillard/sphinx-sitemap/commit/08229f74d1c72d48068a7edd4d55212cfd12172a"><code>08229f7</code></a> DOCS: Add getting started and move CHANGELOG</li> <li>Additional commits viewable in <a href="https://github.com/jdillard/sphinx-sitemap/compare/v2.2.0...v2.5.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sphinx-sitemap&package-manager=pip&previous-version=2.2.0&new-version=2.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
No description provided.