raise KeyError(key) from None KeyError: 'HOME'

#8
by rabbit18snow - opened

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8888
Network URL: http://10.68.50.15:8888

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results.
Setting pad_token_id to eos_token_id:106068 for open-end generation.
2023-06-26 06:40:17.334 Uncaught app exception
Traceback (most recent call last):
File "F:\mossint\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 548, in _run_script
self._session_state.on_script_will_rerun(rerun_data.widget_states)
File "F:\mossint\lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 68, in on_script_will_rerun
self._state.on_script_will_rerun(latest_widget_states)
File "F:\mossint\lib\site-packages\streamlit\runtime\state\session_state.py", line 482, in on_script_will_rerun
self._call_callbacks()
File "F:\mossint\lib\site-packages\streamlit\runtime\state\session_state.py", line 495, in _call_callbacks
self._new_widget_state.call_callback(wid)
File "F:\mossint\lib\site-packages\streamlit\runtime\state\session_state.py", line 247, in call_callback
callback(*args, **kwargs)
File "F:\mossint\MOSS\moss_web_demo_streamlit.py", line 100, in generate_answer
generated_ids = model.generate(
File "F:\mossint\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "F:\mossint\lib\site-packages\transformers\generation\utils.py", line 1518, in generate
return self.greedy_search(
File "F:\mossint\lib\site-packages\transformers\generation\utils.py", line 2285, in greedy_search
outputs = self(
File "F:\mossint\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\mossint\MOSS\models\modeling_moss.py", line 678, in forward
transformer_outputs = self.transformer(
File "F:\mossint\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\mossint\MOSS\models\modeling_moss.py", line 545, in forward
outputs = block(
File "F:\mossint\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\mossint\MOSS\models\modeling_moss.py", line 270, in forward
attn_outputs = self.attn(
File "F:\mossint\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\mossint\MOSS\models\modeling_moss.py", line 164, in forward
qkv = self.qkv_proj(hidden_states)
File "F:\mossint\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\mossint\MOSS\models\quantization.py", line 367, in forward
out = QuantLinearFunction.apply(x.reshape(-1, x.shape[-1]), self.qweight, self.scales,
File "F:\mossint\lib\site-packages\torch\autograd\function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "F:\mossint\lib\site-packages\torch\cuda\amp\autocast_mode.py", line 106, in decorate_fwd
return fwd(*args, **kwargs)
File "F:\mossint\MOSS\models\quantization.py", line 279, in forward
output = matmul248(input, qweight, scales, qzeros, g_idx, bits, maxq)
File "F:\mossint\MOSS\models\quantization.py", line 250, in matmul248
matmul_248_kernel[grid](input, qweight, output,
File "F:\mossint\lib\site-packages\triton\runtime\jit.py", line 106, in launcher
return self.run(*args, grid=grid, **kwargs)
File "F:\mossint\MOSS\models\custom_autotune.py", line 89, in run
timings = {config: self._bench(*args, config=config, **kwargs)
File "F:\mossint\MOSS\models\custom_autotune.py", line 89, in
timings = {config: self._bench(*args, config=config, **kwargs)
File "F:\mossint\MOSS\models\custom_autotune.py", line 71, in _bench
return triton.testing.do_bench(kernel_call, rep=40)
File "F:\mossint\lib\site-packages\triton\testing.py", line 136, in do_bench
fn()
File "F:\mossint\MOSS\models\custom_autotune.py", line 67, in kernel_call
self.fn.run(*args, num_warps=config.num_warps, num_stages=config.num_stages, **current)
File "", line 41, in matmul_248_kernel
File "F:\mossint\lib\site-packages\triton\compiler.py", line 1230, in compile
so_cache_manager = CacheManager(so_cache_key)
File "F:\mossint\lib\site-packages\triton\compiler.py", line 1102, in init
self.cache_dir = os.environ.get('TRITON_CACHE_DIR', default_cache_dir())
File "F:\mossint\lib\site-packages\triton\compiler.py", line 1093, in default_cache_dir
return os.path.join(os.environ["HOME"], ".triton", "cache")
File "F:\mossint\lib\os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'HOME'

Sign up or log in to comment