Skip to content

Conversation

@iProzd
Copy link
Owner

@iProzd iProzd commented Jan 30, 2024

No description provided.

njzjz and others added 4 commits January 30, 2024 11:44
If so, throw the following error:
```
-- PyTorch CXX11 ABI: 0
CMake Error at CMakeLists.txt:162 (message):
  PyTorch CXX11 ABI mismatch TensorFlow: 0 != 1
```

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Fix #3120.

One can disable building the TensorFlow backend during `pip install` by
setting `DP_ENABLE_TENSORFLOW=0`.

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
…g net. (#3199)

- add dp model format (backend independent definition) for the fitting
- refactor torch support, compatible with dp model format
- fix mlp issue: the idt should only be used when a skip connection is
available.
- add tools `to_numpy_array` and `to_torch_tensor`.

---------

Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
Comment on lines +481 to +482
# if atype_tebd is not None:
# inputs = torch.concat([inputs, atype_tebd], dim=-1)

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
if nap > 0:
iap = rng.normal(size=(self.nf, self.nloc, nap - 1))
with self.assertRaises(ValueError) as context:
ret0 = ifn0(dd[0], atype, fparam=ifp, aparam=iap)

Check warning

Code scanning / CodeQL

Variable defined multiple times

This assignment to 'ret0' is unnecessary as it is [redefined](1) before this value is used.
self.assertEqual(onk.dtype, npp)
with self.assertRaises(ValueError) as ee:
foo = foo.astype(np.int32)
bar = to_torch_tensor(foo)

Check warning

Code scanning / CodeQL

Variable defined multiple times

This assignment to 'bar' is unnecessary as it is [redefined](1) before this value is used.
def test_new_old(
self,
):
rng = np.random.default_rng()

Check notice

Code scanning / CodeQL

Unused local variable

Variable rng is not used.
)
atype = torch.tensor(self.atype_ext[:, :nloc], dtype=int, device=env.DEVICE)

od = 1

Check notice

Code scanning / CodeQL

Unused local variable

Variable od is not used.
@classmethod
def deserialize(cls, data: dict) -> "InvarFitting":
data = copy.deepcopy(data)
variables = data.pop("@variables")

Check failure

Code scanning / CodeQL

Modification of parameter with default

This expression mutates a [default value](1).
def deserialize(cls, data: dict) -> "InvarFitting":
data = copy.deepcopy(data)
variables = data.pop("@variables")
nets = data.pop("nets")

Check failure

Code scanning / CodeQL

Modification of parameter with default

This expression mutates a [default value](1).
@classmethod
def deserialize(cls, data: dict) -> "InvarFitting":
data = copy.deepcopy(data)
variables = data.pop("@variables")

Check failure

Code scanning / CodeQL

Modification of parameter with default

This expression mutates a [default value](1).
def deserialize(cls, data: dict) -> "InvarFitting":
data = copy.deepcopy(data)
variables = data.pop("@variables")
nets = data.pop("nets")

Check failure

Code scanning / CodeQL

Modification of parameter with default

This expression mutates a [default value](1).
if use_aparam_as_mask:
raise NotImplementedError("use_aparam_as_mask is not implemented")
if use_aparam_as_mask:
raise NotImplementedError("use_aparam_as_mask is not implemented")

Check warning

Code scanning / CodeQL

Unreachable code

This statement is unreachable.
iProzd added a commit that referenced this pull request Jan 30, 2024
This reverts commit cb4cc67.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants