vaex icon indicating copy to clipboard operation
vaex copied to clipboard

Export_hdf5 with an error: ValueError: No memory tracker found with name default

Open wybert opened this issue 1 year ago • 3 comments

I got an error when exporting to hdf5. I use wsl2 in windows.

temp = pd.read_parquet(file_path)
    vaex_df = vaex.from_pandas(temp,copy_index=False)
    vaex_df.export_hdf5('test.hdf5')

ValueError Traceback (most recent call last) Cell In [13], line 9 7 temp = pd.read_parquet(file_path) 8 vaex_df = vaex.from_pandas(temp,copy_index=False) ----> 9 vaex_df.export_hdf5('test.hdf5') 10 # vaex_df.export_hdf5(output_path + file_name.split(".")[0] + '.hdf5') 11 12 # temp = vaex.open(file_path) 13 break

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/dataframe.py:6940, in DataFrameLocal.export_hdf5(self, path, byteorder, progress, chunk_size, parallel, column_count, writer_threads, group, mode) 6938 progressbar_write = progressbar.add("write data") 6939 with Writer(path=path, group=group, mode=mode, byteorder=byteorder) as writer: -> 6940 writer.layout(self, progress=progressbar_layout) 6941 writer.write( 6942 self, 6943 chunk_size=chunk_size, (...) 6946 parallel=parallel, 6947 export_threads=writer_threads)

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/hdf5/writer.py:63, in Writer.layout(self, df, progress) 61 str_byte_length = {name:df[name].str.byte_length().sum(delay=True, progress=progressbar_strings) for name, dtype in dtypes.items() if dtype.is_string} 62 str_count = {name:df.count(df[name], delay=True, progress=progressbar_count) for name, dtype in dtypes.items() if dtype.is_string} ---> 63 df.execute() 64 progressbar_count(1) 65 progressbar_strings(1)

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/dataframe.py:421, in DataFrame.execute(self) 419 print(repr(task)) 420 if self.executor.tasks: --> 421 self.executor.execute()

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/execution.py:308, in ExecutorLocal.execute(self) 307 def execute(self): --> 308 for _ in self.execute_generator(): 309 pass

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/execution.py:378, in ExecutorLocal.execute_generator(self, use_async) 376 run.nthreads = nthreads = self.thread_pool.nthreads 377 task_checkers = vaex.tasks.create_checkers() --> 378 memory_tracker = vaex.memory.create_tracker() 379 vaex.memory.local.agg = memory_tracker 380 # we track this for consistency

File ~/mambaforge/envs/py310/lib/python3.10/site-packages/vaex/memory.py:37, in create_tracker() 35 if cls is not None: 36 return cls() ---> 37 raise ValueError(f"No memory tracker found with name {memory_tracker_type}")

ValueError: No memory tracker found with name default

wybert avatar Sep 14 '22 20:09 wybert

It's fine when running in windows but not WSL:(

wybert avatar Sep 16 '22 21:09 wybert

I think i you put numpy to version below 1.22 or so, it should be fine.

JovanVeljanoski avatar Sep 16 '22 21:09 JovanVeljanoski

That's odd, this seems like an installation issue, you can try to remove all vaex packages (check that site-packages contains no vaex directories), upgrade pip, and install vaex again.

maartenbreddels avatar Sep 21 '22 10:09 maartenbreddels

Hello, is it also related to https://github.com/vaexio/vaex/issues/2062 ?

erwanp avatar Oct 11 '22 06:10 erwanp

Hello, is it also related to https://github.com/vaexio/vaex/issues/2062 ?

erwanp avatar Oct 11 '22 06:10 erwanp