Skip to content

Commit 8528dac

Browse files
authored
[MISC] Fix W&B benchmark timestamp logging. (#1892)
* Fix W&B benchmark timestamp logging. * Remove all non-ascii characters in engine submodule.
1 parent 17cd60b commit 8528dac

File tree

15 files changed

+28
-35
lines changed

15 files changed

+28
-35
lines changed

.github/workflows/generic.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
OS_FAMILY=$(python -c "import platform; print(platform.system())")
137137
MACHINE_ARCH=$(python -c "import platform; print(platform.machine())")
138138
GSTAICHI_VERSION=$(python -c "import importlib.metadata ; print(importlib.metadata.version('gstaichi'))")
139-
echo "ARTIFACT_PREFIX=${OS_FAMILY}-${MACHINE_ARCH}-${GSTAICHI_VERSION}-${{ matrix.GS_BACKEND }}-${{ matrix.GS_USE_NDARRAY }}" >> $GITHUB_OUTPUT
139+
echo "ARTIFACT_PREFIX=${OS_FAMILY}-${MACHINE_ARCH}-${GSTAICHI_VERSION}-${{ matrix.GS_BACKEND }}-${{ matrix.GS_ENABLE_NDARRAY }}" >> $GITHUB_OUTPUT
140140
141141
- name: Restore Taichi Kernel Cache
142142
if: always()
@@ -153,7 +153,10 @@ jobs:
153153
154154
- name: Save Updated Taichi Kernel Cache
155155
# lets match this version to the black format check
156-
if: ${{ always() && (matrix.OS == 'ubuntu-24.04' || matrix.OS == 'macos-15' || matrix.OS == 'windows-2025') && matrix.PYTHON_VERSION == '3.12' }}
156+
if: >-
157+
${{ always() &&
158+
(matrix.OS == 'ubuntu-24.04' || matrix.OS == 'macos-15' || matrix.OS == 'windows-2025') &&
159+
matrix.PYTHON_VERSION == '3.12' }}
157160
uses: actions/cache/save@v4
158161
with:
159162
path: .cache

genesis/engine/entities/particle_entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ParticleEntity(Entity):
4949
idx : int
5050
Index of this entity in the simulation.
5151
particle_start : int
52-
Global index offset for this entitys particles in the solver.
52+
Global index offset for this entity's particles in the solver.
5353
vvert_start : int, optional
5454
Global index offset for vertex-based rendering, used for skinning.
5555
vface_start : int, optional

genesis/engine/entities/rigid_entity/rigid_entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ def get_jacobian(self, link, local_point=None):
854854
link : RigidLink
855855
The target link.
856856
local_point : torch.Tensor or None, shape (3,)
857-
Coordinates of the point in the links *local* frame.
857+
Coordinates of the point in the link's *local* frame.
858858
If None, the link origin is used (back-compat).
859859
860860
Returns

genesis/engine/materials/PBD/liquid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Liquid(Base):
1313
Parameters
1414
----------
1515
rho: float, optional
16-
The rest density of the fluid in kg/m³. Default is 1000.0.
16+
The rest density of the fluid in kg/m^3. Default is 1000.0.
1717
sampler: str, optional
1818
Particle sampler ('pbs', 'regular', 'random'). Note that 'pbs' is only supported on Linux for now. Defaults to
1919
'pbs' on supported platforms, 'random' otherwise.
@@ -44,7 +44,7 @@ def __init__(
4444

4545
@property
4646
def rho(self):
47-
"""The rest density of the fluid (kg/m³)."""
47+
"""The rest density of the fluid (kg/m^3)."""
4848
return self._rho
4949

5050
@property

genesis/engine/materials/SPH/liquid.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class Liquid(Base):
1313
Parameters
1414
----------
1515
rho: float, optional
16-
The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the rest or undeformed state). Default is 1000.
16+
The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the "rest" or undeformed state). Default is 1000.
1717
stiffness: float, optional
1818
State stiffness (N/m^2). A material constant controlling how pressure increases with compression. Default is 50000.0.
1919
exponent: float, optional
2020
State exponent. Controls how nonlinearly pressure scales with density. Larger values mean stiffer response to compression. Default is 7.0.
2121
mu: float, optional
2222
The viscosity of the liquid. A measure of the internal friction of the fluid or material. Default is 0.005
2323
gamma: float, optional
24-
The surface tension of the liquid. Controls how strongly the material clumps together at boundaries. Default is 0.01
24+
The surface tension of the liquid. Controls how strongly the material "clumps" together at boundaries. Default is 0.01
2525
sampler: str, optional
2626
Particle sampler ('pbs', 'regular', 'random'). Note that 'pbs' is only supported on Linux for now. Defaults to
2727
'pbs' on supported platforms, 'random' otherwise.
@@ -49,7 +49,7 @@ def __init__(
4949

5050
@property
5151
def rho(self):
52-
"""The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the rest or undeformed state)."""
52+
"""The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the "rest" or undeformed state)."""
5353
return self._rho
5454

5555
@property
@@ -69,5 +69,5 @@ def mu(self):
6969

7070
@property
7171
def gamma(self):
72-
"""The surface tension of the liquid. Controls how strongly the material clumps together at boundaries."""
72+
"""The surface tension of the liquid. Controls how strongly the material "clumps" together at boundaries."""
7373
return self._gamma

genesis/engine/scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ def dump_ckpt_to_numpy(self) -> dict[str, np.ndarray]:
13131313
Returns
13141314
-------
13151315
dict[str, np.ndarray]
1316-
Mapping ``"Class.attr[.member]" array`` with raw field data.
1316+
Mapping ``"Class.attr[.member]" -> array`` with raw field data.
13171317
"""
13181318
arrays: dict[str, np.ndarray] = {}
13191319

genesis/engine/sensors/raycaster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@ti.func
4040
def ray_triangle_intersection(ray_start, ray_dir, v0, v1, v2):
4141
"""
42-
Möller-Trumbore ray-triangle intersection.
42+
Moller-Trumbore ray-triangle intersection.
4343
4444
Returns: vec4(t, u, v, hit) where hit=1.0 if intersection found, 0.0 otherwise
4545
"""

genesis/engine/solvers/base_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def dump_ckpt_to_numpy(self) -> dict[str, np.ndarray]:
7070
key_base = ".".join((self.__class__.__name__, attr_name))
7171
data = value.to_numpy()
7272

73-
# StructField data is a dict: flatten each member
73+
# StructField -> data is a dict: flatten each member
7474
if isinstance(data, dict):
7575
for sub_name, sub_arr in data.items():
7676
arrays[f"{key_base}.{sub_name}"] = sub_arr

genesis/engine/solvers/fem_solver.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ def init_constraints(self):
307307
target_pos=gs.ti_vec3, # target position for the constraint
308308
is_soft_constraint=gs.ti_bool, # use spring for soft constraints
309309
stiffness=gs.ti_float, # spring stiffness
310-
damping=gs.ti_float, # spring damping
311310
link_idx=gs.ti_int, # index of the rigid link (-1 if not linked)
312311
link_offset_pos=gs.ti_vec3, # offset position of link
313312
link_init_quat=gs.ti_vec4, # offset rotation of link

genesis/engine/solvers/rigid/backward_constraint_solver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def kernel_solve_adjoint_u(
6060
static_rigid_sim_config: ti.template(),
6161
):
6262
r"""
63-
Solve for the adjoint vector [u] from Au = g, where A = ∂F/∂qacc (primal Hessian on the active set) and g = ∂L/∂qacc.
64-
Intuitively, [u] is a sensitivity vector that translates the upstream gradient ∂L/∂qacc into the primal space.
63+
Solve for the adjoint vector [u] from Au = g, where A = dF/dqacc (primal Hessian on the active set) and g = dL/dqacc.
64+
Intuitively, [u] is a sensitivity vector that translates the upstream gradient dL/dqacc into the primal space.
6565
This adjoint vector [u] can be used an intermediate variable to compute the downstream gradients. Since A is a
6666
Semi-Positive Definite (SPD) matrix, we can solve A * u = g using either Cholesky decomposition or CG solver.
6767
When Newton solver was used, we reuse the Cholesky decomposition of A (= L * L^T) to solve A * u = g. Otherwise,

0 commit comments

Comments
 (0)