zhenpengyao / supramolecular_vae Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Dear,
Thank you for providing this great repository. I have one questions about optimization.
In the paper, when search MOFs having maximum properties in the latent space, the gaussian process model was used. But I can't find it in this repository. So, Is there any reference which I can get some information regarding gaussian process?
Best Regards,
Hey there!
I am encountering an issue where when I run the prediction notebook. When I run this cell:
train_mof = model.df_to_tuples(df.loc[train_index], smiles_column)
test_mof = model.df_to_tuples(df.loc[test_index], smiles_column)
prop_train = model.df_to_tuples(prop_df.loc[prop_train_index], smiles_column)
prop_test = model.df_to_tuples(prop_df.loc[prop_test_index], smiles_column)
train_data = train_mof + prop_train
test_data = test_mof + prop_tes
I get the error \Lrexpl not in dictionary!
. Is this an issue with the selfies
library or training, or is it something else?
Here is the traceback:
ValueError Traceback (most recent call last)
<ipython-input-101-e9059b196f9e> in <module>()
----> 1 train_mof = model.df_to_tuples(df.loc[train_index], smiles_column)
2 test_mof = model.df_to_tuples(df.loc[test_index], smiles_column)
3 prop_train = model.df_to_tuples(prop_df.loc[prop_train_index], smiles_column)
4 prop_test = model.df_to_tuples(prop_df.loc[prop_test_index], smiles_column)
5 train_data = train_mof + prop_train
11 frames
/content/drive/My Drive/research/Supramolecular_VAE/vaemof/model.py in df_to_tuples(self, df, smiles_column)
316 def df_to_tuples(self, df: pd.DataFrame, smiles_column: Text) -> List[DataTuple]:
317 n = len(df)
--> 318 smi_ids = self.vocab.df_to_ids(df, smiles_column)
319 mof_ids = self.vocab_mof.df_to_ids(df)
320 has_y = all(i in df.columns.tolist() for i in self.vocab_y.labels)
/content/drive/My Drive/research/Supramolecular_VAE/vaemof/vocabs.py in df_to_ids(self, df, column, batch)
155 print("column:", column)
156 strings = df.iloc[list(indexes)][column].tolist()
--> 157 ids = Parallel(n_jobs=n_jobs)(delayed(self.string_to_ids)(s) for s in strings)
158 ids_list.extend(ids)
159 return ids_list
/usr/local/lib/python3.6/dist-packages/joblib/parallel.py in __call__(self, iterable)
1030 self._iterating = self._original_iterator is not None
1031
-> 1032 while self.dispatch_one_batch(iterator):
1033 pass
1034
/usr/local/lib/python3.6/dist-packages/joblib/parallel.py in dispatch_one_batch(self, iterator)
845 return False
846 else:
--> 847 self._dispatch(tasks)
848 return True
849
/usr/local/lib/python3.6/dist-packages/joblib/parallel.py in _dispatch(self, batch)
763 with self._lock:
764 job_idx = len(self._jobs)
--> 765 job = self._backend.apply_async(batch, callback=cb)
766 # A job can complete so quickly than its callback is
767 # called before we get here, causing self._jobs to
/usr/local/lib/python3.6/dist-packages/joblib/_parallel_backends.py in apply_async(self, func, callback)
206 def apply_async(self, func, callback=None):
207 """Schedule a func to be run"""
--> 208 result = ImmediateResult(func)
209 if callback:
210 callback(result)
/usr/local/lib/python3.6/dist-packages/joblib/_parallel_backends.py in __init__(self, batch)
570 # Don't delay the application, to avoid keeping the input
571 # arguments in memory
--> 572 self.results = batch()
573
574 def get(self):
/usr/local/lib/python3.6/dist-packages/joblib/parallel.py in __call__(self)
251 with parallel_backend(self._backend, n_jobs=self._n_jobs):
252 return [func(*args, **kwargs)
--> 253 for func, args, kwargs in self.items]
254
255 def __reduce__(self):
/usr/local/lib/python3.6/dist-packages/joblib/parallel.py in <listcomp>(.0)
251 with parallel_backend(self._backend, n_jobs=self._n_jobs):
252 return [func(*args, **kwargs)
--> 253 for func, args, kwargs in self.items]
254
255 def __reduce__(self):
/content/drive/My Drive/research/Supramolecular_VAE/vaemof/vocabs.py in string_to_ids(self, string, pad_seq, max_len)
125 def string_to_ids(self, string, pad_seq=False, max_len=0):
126 print("String:",self.string_preprocess(string))
--> 127 ids = [self.char_to_id(c) for c in self.string_preprocess(string)]
128 max_len = self.max_len if max_len == 0 else max_len
129 ids = self.add_bos_eos(ids)
/content/drive/My Drive/research/Supramolecular_VAE/vaemof/vocabs.py in <listcomp>(.0)
125 def string_to_ids(self, string, pad_seq=False, max_len=0):
126 print("String:",self.string_preprocess(string))
--> 127 ids = [self.char_to_id(c) for c in self.string_preprocess(string)]
128 max_len = self.max_len if max_len == 0 else max_len
129 ids = self.add_bos_eos(ids)
/content/drive/My Drive/research/Supramolecular_VAE/vaemof/vocabs.py in char_to_id(self, char)
111 #print(self.c2i)
112 if char not in self.c2i:
--> 113 raise ValueError(f'{char} not in dictionary!')
114
115 return self.c2i[char]
ValueError: \Lrexpl not in dictionary!
Thanks,
Thys
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.