Spaces:
Runtime error
runtime error
_function( File "/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py", line 835, in call_function prediction = await anyio.to_thread.run_sync( File "/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "app.py", line 19, in generate_data rtf_model.fit(df, num_bootstrap=10) # Default is 500 File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 454, in fit trainer = self._train_with_sensitivity( File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 693, in _train_with_sensitivity trainer = self._fit_tabular( File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 1088, in _fit_tabular return self._build_tabular_trainer( File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 1138, in _build_tabular_trainer args=TrainingArguments(**training_args_kwargs), File "<string>", line 111, in __init__ File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1333, in __post_init__ and (self.device.type != "cuda") File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1697, in device return self._setup_devices File "/home/user/.local/lib/python3.8/site-packages/transformers/utils/generic.py", line 54, in __get__ cached = self.fget(obj) File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1613, in _setup_devices raise ImportError( ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`
Container logs:
Caching examples at: '/home/user/app/gradio_cached_examples/21'
/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py:76: UserWarning: The device=cuda is not available, using device=cpu instead.
warnings.warn(f"The device={device} is not available, using device={_device} instead.")
/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py:566: UserWarning: Duplicate rate (0.0) in the data is zero. The `qt_interval` will be set to qt_interval_unique=100.
warnings.warn(
Computing the sensitivity threshold...
Using parallel computation!!!
/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py:593: UserWarning: qt_interval adjusted from 100 to 6...
warnings.warn(
Bootstrap round: 0%| | 0/10 [00:00<?, ?it/s]
Bootstrap round: 80%|████████ | 8/10 [00:06<00:01, 1.27it/s]
Bootstrap round: 100%|██████████| 10/10 [00:06<00:00, 1.59it/s]
Sensitivity threshold summary:
count 10.000000
mean 0.001138
std 0.010237
min -0.012831
25% -0.006415
50% -0.000529
75% 0.007672
max 0.021825
dtype: float64
Sensitivity threshold: 0.015753968253968235 qt_max: 0.05
Map: 0%| | 0/768 [00:00<?, ? examples/s]
Map: 47%|████▋ | 363/768 [00:00<00:00, 3581.70 examples/s]
Map: 100%|██████████| 768/768 [00:00<00:00, 3477.86 examples/s]
Traceback (most recent call last):
File "app.py", line 110, in <module>
examples = gr.Examples(examples=[['diabetes.arff',5], ["titanic.csv", 15]],inputs = [data_input_u,num_samples], outputs = [data_output], cache_examples = True, fn = generate_data)
File "/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py", line 69, in create_examples
utils.synchronize_async(examples_obj.create)
File "/home/user/.local/lib/python3.8/site-packages/gradio/utils.py", line 420, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py", line 100, in sync
raise return_result
File "/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py", line 55, in _runner
result[0] = await coro
File "/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py", line 273, in create
await self.cache()
File "/home/user/.local/lib/python3.8/site-packages/gradio/helpers.py", line 308, in cache
prediction = await Context.root_block.process_api(
File "/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py", line 1017, in process_api
result = await self.call_function(
File "/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py", line 835, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "app.py", line 19, in generate_data
rtf_model.fit(df, num_bootstrap=10) # Default is 500
File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 454, in fit
trainer = self._train_with_sensitivity(
File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 693, in _train_with_sensitivity
trainer = self._fit_tabular(
File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 1088, in _fit_tabular
return self._build_tabular_trainer(
File "/home/user/.local/lib/python3.8/site-packages/realtabformer/realtabformer.py", line 1138, in _build_tabular_trainer
args=TrainingArguments(**training_args_kwargs),
File "<string>", line 111, in __init__
File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1333, in __post_init__
and (self.device.type != "cuda")
File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1697, in device
return self._setup_devices
File "/home/user/.local/lib/python3.8/site-packages/transformers/utils/generic.py", line 54, in __get__
cached = self.fget(obj)
File "/home/user/.local/lib/python3.8/site-packages/transformers/training_args.py", line 1613, in _setup_devices
raise ImportError(
ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`