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

Cannot use save_log and log_history #61

Open
david-wei-01001 opened this issue May 17, 2024 · 1 comment
Open

Cannot use save_log and log_history #61

david-wei-01001 opened this issue May 17, 2024 · 1 comment

Comments

@david-wei-01001
Copy link

david-wei-01001 commented May 17, 2024

Hi,
I want to access

CONFIG_MAP["log“]

to record the number of steps took, but after I try both

import lade
...
lade.save_log()

or

from lade.utils import save_log
...
save_log()

It seems all says that "save_log" does not exist in lade. same happens for "log_history"

Also, I have tryed to print want comes with lade, and it seems they are both not there:

import lade
print(dir(lade))
import lade.utils
print(dir(lade.utils))

And the output is:

['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'augment_all', 'augment_generate', 'augment_llama', 'config_lade', 'decoding', 'models', 'utils']
['AutoConfig', 'AutoModelForCausalLM', 'AutoTokenizer', 'CONFIG_MAP', 'FUNC_MAP', 'GenerationMixin', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'augment_all', 'augment_generate', 'augment_llama', 'config_lade', 'get_hf_model', 'get_model', 'greedy_search_proxy', 'llama', 'modeling_llama', 'os', 'torch']
@david-wei-01001
Copy link
Author

It turns out, if using

pip install lade

Then these functions cannot be accessed, but if just cloning the repo

git clone https://github.com/hao-ai-lab/LookaheadDecoding.git
cd LookaheadDecoding
pip install -r requirements.txt
pip install -e .

Then in minimal.py it can be used freely

I will leave this open as adding this feature to lade package would be great

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

1 participant