skoltech-chr / deepfield Goto Github PK
View Code? Open in Web Editor NEWMachine learning framework for reservoir simulation
License: Apache License 2.0
Machine learning framework for reservoir simulation
License: Apache License 2.0
Hello.
Please look at RESULTS.zip file. I am trying '06.Rates_calculation' tutorial file.
zip file size is too small and is most probably empty.
Thanks.
Greetings,
Thanks for sharing this work!
I went through the tutorials but got stuck in the calculation of the statistics for the FieldDataset in Tutorial #8 (Dataset and Sample). The cell, and error message obtained are pasted below.
I should mention that the STATES shape from the previous cell yields a dimension of: [1, 248, 5, 46, 112, 22]. Is this what you expect?
Any comments on how to fix this will be much appreciated.
Thanks,
Femi
dataset = FieldDataset(src=field, sample_attrs=sample_attrs, allow_change_preloaded=True)
dataset.calculate_statistics()
sample = next(iter(dataset))
IndexError Traceback (most recent call last)
Input In [15], in <cell line: 2>()
1 dataset = FieldDataset(src=field, sample_attrs=sample_attrs, allow_change_preloaded=True)
----> 2 dataset.calculate_statistics()
3 sample = next(iter(dataset))
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/datasets/datasets.py:610, in FieldDataset.calculate_statistics(self)
607 maxim[comp] = {attr: [] for attr in self.sample_attrs[comp]}
609 for i in range(len(self)):
--> 610 m, m_sq, mn, mx = self._get_model_statistics(i)
611 for comp in m:#pylint:disable=consider-using-dict-items
612 for attr in m[comp]:
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/datasets/datasets.py:635, in FieldDataset._get_model_statistics(self, idx)
633 def _get_model_statistics(self, idx):
634 """Get mean and mean of squares for the attributes of the model."""
--> 635 sample = self._get_sample(idx)
636 mean, mean_of_squares, minim, maxim = {}, {}, {}, {}
637 for comp in sample.keys():
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/datasets/datasets.py:180, in FieldDataset._get_sample(self, idx)
178 if isinstance(self.preloaded[idx], FieldSample):
179 return self.preloaded[idx]
--> 180 model = self._get_preloaded(idx)
182 sample = {}
183 getter_kwargs = dict(
184 sequence_subset=sequence_subset, fill_invalid_neighbours=INVALID_VALUE_FILLER, neighbouring_radius=1
185 )
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/datasets/datasets.py:236, in FieldDataset._get_preloaded(self, idx)
234 model.wells.drop_outside()
235 if model.meta['MODEL_TYPE'] == 'ECL':
--> 236 model.wells.compute_events(grid=model.grid)
237 else:
238 assert model.state.spatial == self.unravel_model
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/field/decorators.py:225, in instance_check..decorator..wrapper(self, *args, **kwargs)
222 if not valid(self):
223 raise ValueError('State of {} is not valid for applying {}.'
224 .format(self.class.name, method.name))
--> 225 return method(self, *args, **kwargs)
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/field/decorators.py:120, in apply_to_each_segment..decorator(self, *args, **kwargs)
118 if not include_groups and segment.is_group:
119 continue
--> 120 res.append(method(self, segment, *args, **kwargs))
121 if isinstance(res[0], self.class):
122 return self
File ~/anaconda3/envs/py3p8/lib/python3.8/site-packages/DeepField-0.1.0-py3.8.egg/deepfield/field/wells.py:521, in Wells.compute_events(self, segment, grid, attr)
519 wcon = wcon.sort_values('DATE').reset_index(drop=True)
520 df['DATE'] = wcon['DATE']
--> 521 dref_index = np.argmin(segment.perforated_blocks()[:, 2])
522 dref_index = segment.perforated_blocks()[:, :3][dref_index]
523 df['DREF'] = grid.cell_centroids[dref_index[0], dref_index[1], dref_index[2]][2]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
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.