Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSS Review: Example Notebook 6_inversion.ipynb #1

Open
kujaku11 opened this issue Aug 11, 2024 · 1 comment
Open

JOSS Review: Example Notebook 6_inversion.ipynb #1

kujaku11 opened this issue Aug 11, 2024 · 1 comment

Comments

@kujaku11
Copy link

kujaku11 commented Aug 11, 2024

Running Jupyter notebook examples/6_Inversion.ipynb produces the following error in the 7th cell down [using pip install --> v0.3 and notebooks from main branch]:

---------------------------------------------------------------------------
RemoteTraceback                           Traceback (most recent call last)
RemoteTraceback: 
"""
Traceback (most recent call last):
  File "[\Anaconda3\envs\pide\lib\multiprocessing\pool.py", line 125](file://Anaconda3/envs/pide/lib/multiprocessing/pool.py#line=124), in worker
    result = (True, func(*args, **kwds))
  File "[\Anaconda3\envs\pide\lib\multiprocessing\pool.py", line 48](file://Anaconda3/envs/pide/lib/multiprocessing/pool.py#line=47), in mapstar
    return list(map(*args))
  File "[\Anaconda3\envs\pide\lib\site-packages\pide\inversion.py", line 58](file://Anaconda3/envs/pide/lib/site-packages/pide/inversion.py#line=57), in _solv_cond_
    object.mantle_water_distribute(method = 'index', sol_idx = index)
  File "[\Anaconda3\envs\pide\lib\site-packages\pide\pide.py", line 4398](file://Anaconda3/envs/pide/lib/site-packages/pide/pide.py#line=4397), in mantle_water_distribute
    pide.ol_water[idx_node] = self.solid_water[idx_node] / (self.ol_frac_wt[idx_node] + ((self.opx_frac_wt[idx_node] * self.d_opx_ol[idx_node]) +\
AttributeError: type object 'pide' has no attribute 'ol_water'
"""

The above exception was the direct cause of the following exception:

AttributeError                            Traceback (most recent call last)
Cell In[7], line 1
----> 1 c_list, residual_list = conductivity_solver_single_param(object = p_obj, cond_list = cond_list_to_invert,
      2 param_name = 'bulk_water', upper_limit_list = max_water, lower_limit_list= np.zeros(len(max_water)),
      3 search_start = 30, acceptence_threshold = 0.5, num_cpu = 5)

File [~\Anaconda3\envs\pide\lib\site-packages\pide\inversion.py:253](http://localhost:8888/lab/tree/pide/examples/notebooks/~/Anaconda3/envs/pide/lib/site-packages/pide/inversion.py#line=252), in conductivity_solver_single_param(object, cond_list, param_name, upper_limit_list, lower_limit_list, search_start, acceptence_threshold, cond_err, transition_zone, num_cpu, **kwargs)
    247 with multiprocessing.Pool(processes=num_cpu) as pool:
    249 	process_item_partial = partial(_solv_cond_, cond_list = cond_list, object = object, param = param_name, upperlimit = upper_limit_list,
    250 	lowerlimit=lower_limit_list , search_increment= search_start, acceptence_threshold = acceptence_threshold, init_guess = 0, transition_zone = transition_zone,
    251 	water_solv=water_solv,comp_solv = comp_solv, comp_type = comp_type, comp_index = comp_index, low_value_threshold = low_value_threshold)
--> 253 	c = pool.map(process_item_partial, index_list)
    255 c_list = [x[0] for x in c]
    256 residual_list= [x[1] for x in c]

File [~\Anaconda3\envs\pide\lib\multiprocessing\pool.py:364](http://localhost:8888/lab/tree/pide/examples/notebooks/~/Anaconda3/envs/pide/lib/multiprocessing/pool.py#line=363), in Pool.map(self, func, iterable, chunksize)
    359 def map(self, func, iterable, chunksize=None):
    360     '''
    361     Apply `func` to each element in `iterable`, collecting the results
    362     in a list that is returned.
    363     '''
--> 364     return self._map_async(func, iterable, mapstar, chunksize).get()

File [~\Anaconda3\envs\pide\lib\multiprocessing\pool.py:771](http://localhost:8888/lab/tree/pide/examples/notebooks/~/Anaconda3/envs/pide/lib/multiprocessing/pool.py#line=770), in ApplyResult.get(self, timeout)
    769     return self._value
    770 else:
--> 771     raise self._value

AttributeError: type object 'pide' has no attribute 'ol_water'
@kujaku11 kujaku11 changed the title JOSS Review: Example Notebook 6_inversion.ipynb JOSS Review: Example Notebook 6_inversion.ipynb and 8_MantleWaterContent_and_Rheology_from_MT.ipynb Aug 11, 2024
@kujaku11 kujaku11 changed the title JOSS Review: Example Notebook 6_inversion.ipynb and 8_MantleWaterContent_and_Rheology_from_MT.ipynb JOSS Review: Example Notebook 6_inversion.ipynb Aug 11, 2024
@sinanozaydin
Copy link
Owner

The issues should be resolved in the latest version at the github repo (post-joss branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants