Giter VIP home page Giter VIP logo

Comments (6)

ilyes319 avatar ilyes319 commented on August 24, 2024 1

I will close this as we have merged the PR #22.

from mace.

davkovacs avatar davkovacs commented on August 24, 2024

I think the problem might be cause by setting the defuault datatype in the training script, but not in the evaluation. Can you try setting the flag --default_dtype the same way for eval as for train.

from mace.

MengnanCui avatar MengnanCui commented on August 24, 2024

Thanks for the qqquick reply, let me check it

from mace.

MengnanCui avatar MengnanCui commented on August 24, 2024

I think the problem might be cause by setting the defuault datatype in the training script, but not in the evaluation. Can you try setting the flag --default_dtype the same way for eval as for train.

Hey, It works, but with more stories. I set the flag --default_dtype='float32 firstly, then it gives out the report as below:

Traceback (most recent call last):
  File "/u/mncui/software/mace_v2/scripts/eval_configs.py", line 113, in <module>
    main()
  File "/u/mncui/software/mace_v2/scripts/eval_configs.py", line 78, in main
    output = model(batch, training=False)
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/mace/modules/models.py", line 226, in forward
    edge_index=data.edge_index,
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/mace/modules/blocks.py", line 517, in forward
    node_feats[sender], edge_attrs, tp_weights
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/e3nn/o3/_tensor_product/_tensor_product.py", line 529, in forward
    return self._compiled_main_left_right(x, y, real_weight)
  File "/u/mncui/software/anaconda3/envs/mace_env2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/torch/fx/graph_module/___torch_mangle_8.py", line 109, in forward
    einsum_18 = torch.einsum("dba,dbc->dbac", [reshape_5, reshape_28])
    mul_2 = torch.mul(reshape_7, 2.2360679774997898)
    tensordot_1 = torch.tensordot(mul_2, _w3j_1_1_2, [2], [1])
                  ~~~~~~~~~~~~~~~ <--- HERE
    einsum_19 = torch.einsum("edab,ecad->ecb", [tensordot_1, einsum_18])
    reshape_29 = torch.reshape(einsum_19, [getitem_4, 640])

Traceback of TorchScript, original code (most recent call last):
    einsum_18 = torch.functional.einsum('dba,dbc->dbac', reshape_5, reshape_28);  reshape_28 = None
    mul_2 = reshape_7 * 2.23606797749979;  reshape_7 = None
    tensordot_1 = torch.functional.tensordot(mul_2, _w3j_1_1_2, [2], [1]);  mul_2 = _w3j_1_1_2 = None
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    einsum_19 = torch.functional.einsum('edab,ecad->ecb', tensordot_1, einsum_18);  tensordot_1 = einsum_18 = None
    reshape_29 = einsum_19.reshape(getitem_4, 640);  einsum_19 = None
RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)

I guess it might be related to cuda setting, so I add another flag --device=cuda \, then It works!!!
I checked the output.xyz, exactly right, thanks a lot for the information!!!

By the way, another small curiousity about the flag --config_type_weights, my understanding, it is a dict, where I can define the weight for each config_type like {'diamond':0.5, 'graphene':0.7, ...}, right?
I wonder is it possible to set a weight for each structure in order to emphasize where could MACE pay attention to (new configurations).

from mace.

davkovacs avatar davkovacs commented on August 24, 2024

I am glad it works! :)
The per configuration weights are implemented in this pull request: #22

I think we will merge it later today to the develop branch. cc @ilyes319

from mace.

MengnanCui avatar MengnanCui commented on August 24, 2024

Great! Thanks a lot!

from mace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.