Turning off TF2 auto-sharding warning
2020-09-14 19:15:49

https://github.com/tensorflow/tensorflow/issues/42146#issuecomment-671484239

Message: "Consider either turning off auto-sharding or switching the auto_shard_policy to DATA to shard this dataset."

If your Tensorflow scripts leave this log message, then it falls back to use DATA type sharding. Thus, to turn off the log message you can set auto_shard_policy to DATA using tf.data.Options() as follows:

options = tf.data.Options()

options.experimental_distribute.auto_shard_policy = tf.data.experimental.AutoShardPolicy.DATA

dataset = dataset.with_options(options)

▼ more
Tensorflow 2.4.0
2020-09-10 15:31:35

checking whether mkl is enabled or not.

python -c "from tensorflow.python.framework import test_util;print(test_util.IsMklEnabled())"

▼ more
Molecular embedding from sdf(3D)
2020-09-02 11:16:46

ref: https://www.rdkit.org/docs/GettingStartedInPython.html

ref: https://github.com/keiserlab/e3fp

ref: https://github.com/CanisW/TF3P/blob/master/data/utils.py

. prerequisites

rdkit : https://www.rdkit.org/docs/index.html

 > import rdkit.Chem as Chem

 > from rdkit.Chem import AllChem

e3fp : pip install e3fp

 > from e3fp.fingerprint.generate import fprints_dict_from_mol

. input: sdf (3D) to mol

 - text sdf

 > suppl = Chem.SDMolSupplier(/path_to_sdf)

 > mol = suppl[0]

 - binary sdf

 > inf = open(/path_to_sdf,'rb')

 > fsuppl = Chem.ForwardSDMolSupplier(inf)

 - zip sdf (import gzip)

 > inf = gzip.open('/path_to_sdf.gz')

 > fsuppl = Chem.ForwardSDMolSupplier(inf)

 * fsuppl is not randomly accessed

 example)

 for mol in fsuppl: 

   ... use "mol" ...

. output (previous researches)

 - ECFP: ecfp_obj = AllChem.GetMorganFingerprintAsBitVect(mol, 2, nBits=nBits)

 - MACCSKey: macc_obj = AllChem.GetMACCSKeysFingerprint(mol)

 - E3FP: e3fp_obj = fprints_dict_from_mol(mol, bits=nBits)[5][0].to_rdkit()

▼ more
아몬드
2020-08-27 18:13:14

소율이는 초코렛 과자에서 초코렛 부분만 먹는다.

이를테면 초코송이에서 초코부분만 먹고 막대는 버린다.

물론 지율이도 따라하기 때문에 함께 사이좋게 막대를 버린다.

초코송이 상자를 들고있는 사람에게 막대를 넣는 사이좋은 모습을 보면 부모로서 뿌듯하기도 하다.

나는 아몬드 할아버지 이야기를 알고 있다.

한 두세 달 전쯤 일이다.

소율이가 해맑게 웃으며 다가와 아몬드를 주었다.

안 보이는 곳에 살며시 두고 먹었다고 거짓말을 했다가 양심의 가책을 느껴 다시 돌아가 주워 먹었다.

▼ more