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

--[BE] - Miscellaneous minor refactors and cleanup #2516

Merged
merged 6 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/install_ubuntu_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
run: |-
echo "Install conda and dependencies"
conda install -y pytorch==1.12.1 torchvision==0.13.1 -c pytorch -c nvidia
conda install -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis pytest-mock
conda install -y -c conda-forge ninja numpy=1.26.4 pytest pytest-cov ccache hypothesis pytest-mock
pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython mock
shell: bash -el {0}
- name: Validate Pytorch Installation
Expand Down
5 changes: 5 additions & 0 deletions examples/tutorials/async_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
back to the main thread by calling sim.get_sensor_observations_async_finish() by default.
"""


# Need to import quaternion library here despite it not being used or else importing
# habitat_sim below will cause an invalid free() when audio is enabled in sim compilation
import quaternion # noqa: F401

import habitat_sim


Expand Down
4 changes: 4 additions & 0 deletions examples/tutorials/stereo_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

import numpy as np

# Need to import quaternion library here despite it not being used or else importing
# habitat_sim below will cause an invalid free() when audio is enabled in sim compilation
import quaternion # noqa: F401

import habitat_sim

cv2 = None
Expand Down
18 changes: 11 additions & 7 deletions src/esp/core/managedContainers/ManagedFileBasedContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class ManagedFileBasedContainer : public ManagedContainer<T, Access> {
} // ManagedFileBasedContainer::createObjectFromJSONString

/**
* @brief Method to load a Managed Object's data from a file. If the file
* @brief Method to load a Managed Object's data from a file. If the file
* type is not supported by specialization of this method, this method
* executes and an error is thrown.
* @tparam type of document to load.
Expand All @@ -131,15 +131,19 @@ class ManagedFileBasedContainer : public ManagedContainer<T, Access> {
template <typename U>
ManagedFileIOPtr buildManagedObjectFromDoc(const std::string& filename,
CORRADE_UNUSED const U& config) {
ESP_ERROR(Mn::Debug::Flag::NoSpace)
<< "<" << this->objectType_
<< "> : Failure loading attributes from document `" << filename
<< "` of unknown type `" << typeid(U).name()
<< "` so unable to build object.";
CORRADE_ASSERT(false,
Cr::Utility::formatString(
"<{}> : Failure loading attributes from document `{}` "
"of unsupported file type `{}` so unable to build "
"object. Make sure a specialization of "
"ManagedFileBasedContainer::buildManagedObjectFromDoc() "
"supporting this file type has been implemented.",
this->objectType_, filename, typeid(U).name()),
nullptr);
} // ManagedFileBasedContainer::buildManagedObjectFromDoc

/**
* @brief Method to load a Managed Object's data from a file. This is the
* @brief Method to load a Managed Object's data from a file. This is the
* JSON specialization, using type inference.
* @param filename name of file document to load from
* @param config JSON document to read for data
Expand Down
2 changes: 0 additions & 2 deletions src/esp/physics/objectWrappers/ManagedArticulatedObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ class ManagedArticulatedObject
/**
* @brief Retrieve a comma-separated string holding the header values for the
* info returned for this managed object, type-specific.
* TODO : once Magnum supports retrieving key-values of configurations, use
* that to build this data.
*/

std::string getPhyObjInfoHeaderInternal() const override {
Expand Down
2 changes: 0 additions & 2 deletions src/esp/physics/objectWrappers/ManagedPhysicsObjectBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ class AbstractManagedPhysicsObject
/**
* @brief Retrieve a comma-separated string holding the header values for
* the info returned for this managed object, type-specific.
* TODO : once Magnum supports retrieving key-values of configurations, use
* that to build this data.
*/

virtual std::string getPhyObjInfoHeaderInternal() const = 0;
Expand Down
4 changes: 0 additions & 4 deletions src/esp/physics/objectWrappers/ManagedRigidBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ class AbstractManagedRigidBase
/**
* @brief Retrieve a comma-separated string holding the header values for the
* info returned for this managed object, type-specific.
* TODO : once Magnum supports retrieving key-values of configurations, use
* that to build this data.
*/

std::string getPhyObjInfoHeaderInternal() const override {
Expand All @@ -263,8 +261,6 @@ class AbstractManagedRigidBase
/**
* @brief Retrieve a comma-separated string holding the header values for
* the info returned for this managed object, rigid-base-specific.
* TODO : once Magnum supports retrieving key-values of configurations, use
* that to build this data.
*/
virtual std::string getRigidBaseInfoHeaderInternal() const = 0;
/**
Expand Down
2 changes: 0 additions & 2 deletions src/esp/physics/objectWrappers/ManagedRigidObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ class ManagedRigidObject
/**
* @brief Retrieve a comma-separated string holding the header values for
* the info returned for this managed object, rigid-base-specific.
* TODO : once Magnum supports retrieving key-values of configurations, use
* that to build this data.
*/
std::string getRigidBaseInfoHeaderInternal() const override {
return "Creation Attributes Name";
Expand Down
Loading
Loading