shyamsn97 / mario-gpt

[Neurips 2023] Generating Mario Levels with GPT2. Code for the paper "MarioGPT: Open-Ended Text2Level Generation through Large Language Models" https://arxiv.org/abs/2302.05981
https://huggingface.co/shyamsn97/Mario-GPT2-700-context-length
MIT License
1.12k stars 101 forks source link

Getting this issue... TrainingConfig can't load #23

Closed AMEERAZAM08 closed 1 year ago

AMEERAZAM08 commented 1 year ago

`ImportError Traceback (most recent call last) in <cell line: 2>() 1 import torch ----> 2 from mario_gpt import MarioDataset, MarioLM, TrainingConfig, MarioGPTTrainer 3 4 # create basic gpt model 5 BASE = "distilgpt2"

ImportError: cannot import name 'TrainingConfig' from 'mario_gpt' (/usr/local/lib/python3.10/dist-packages/mario_gpt/init.py)`

AMEERAZAM08 commented 1 year ago

Please if possible @shyamsn97 help me in this I'm training

AMEERAZAM08 commented 1 year ago

Any update @shyamsn97 ?

AMEERAZAM08 commented 1 year ago

Issue resolve but getting this now ..

TypeError Traceback (most recent call last) Cell In[11], line 1 ----> 1 trainer = MarioGPTTrainer(mario_lm, dataset, config=config)

File c:\ProgramData\miniconda3\envs\mario-gpt\lib\site-packages\mario_gpt-0.1.3-py3.8.egg\mario_gpt\trainer.py:73, in MarioGPTTrainer.init(self, mario_lm, train_dataset, config, optimizer, lr_scheduler) 70 if lr_scheduler is None: 71 self.lr_scheduler = self.create_lr_scheduler(self.config, self.optimizer) ---> 73 self.accelerator = self.create_accelerator(self.config)

File c:\ProgramData\miniconda3\envs\mario-gpt\lib\site-packages\mario_gpt-0.1.3-py3.8.egg\mario_gpt\trainer.py:92, in MarioGPTTrainer.create_accelerator(self, config) 91 def create_accelerator(self, config: Any) -> Accelerator: ---> 92 return Accelerator( 93 mixed_precision=config.mixed_precision, 94 gradient_accumulation_steps=config.gradient_accumulation_steps, 95 log_with="tensorboard", 96 logging_dir=os.path.join(config.output_dir, "logs"), 97 )

TypeError: init() got an unexpected keyword argument 'logging_dir'

AMEERAZAM08 commented 1 year ago

sorted

AMEERAZAM08 commented 1 year ago

use accelerate 9.3.0 version