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

Failing on training; trainer.train() #12

Open
rohullaa opened this issue Dec 21, 2022 · 1 comment
Open

Failing on training; trainer.train() #12

rohullaa opened this issue Dec 21, 2022 · 1 comment

Comments

@rohullaa
Copy link

Hey,

I am trying to run a simple text classification on IPUs with PopTorch and Optimum. When I initilize the training by;

trainer.train()

I get the following error:

Traceback (most recent call last):
  File "IPUs/train.py", line 117, in <module>
    trainer.train()
  File "FOLDER/env/lib/python3.6/site-packages/optimum/graphcore/trainer.py", line 904, in train
    self._compile_model(model, next(iter(train_dataloader)), log=True)
  File "FOLDER/env/lib/python3.6/site-packages/optimum/graphcore/trainer.py", line 375, in _compile_model
    model.compile(**sample_batch)
  File "FOLDER/env/lib/python3.6/site-packages/poptorch/_poplar_executor.py", line 651, in compile
    self._compile(in_tensors)
  File "FOLDER(env/lib/python3.6/site-packages/poptorch/_impl.py", line 259, in wrapper
    return func(self, *args, **kwargs)
  File "FOLDER/env/lib/python3.6/site-packages/poptorch/_poplar_executor.py", line 569, in _compile
    self._executable = poptorch_core.compileWithTrace(*trace_args)
poptorch.poptorch_core.Error: In poptorch/python/poptorch.cpp:1371: 'std::out_of_range': basic_string::replace: __pos (which is 5) > this->size() (which is 0)
Error raised in:
  [0] Compiler::initSession
  [1] LowerToPopart::compile
  [2] compileWithTrace

Can someone please help me with this error?

@rohullaa rohullaa changed the title Failing while training; trainer.train() Failing on training; trainer.train() Dec 21, 2022
@payoto
Copy link
Contributor

payoto commented Jan 27, 2023

Hi @rohullaa,
sorry for not seeing this earlier, optimum and transformers do not support python 3.6 anymore so the error might be related to that.
If you still encounter it on Python 3.8 I would need to know which model from Optimum you are trying to run when you get the failure.

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

2 participants