OFASys
OFASys copied to clipboard
unable to run 'usage in 15 minutes' example
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-3-8c9f93f73c07>](https://yucuju2ns5m-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230307-060233-RC01_514758488#) in <module>
1 from ofasys import Task, Trainer, GeneralistModel
----> 2 task1 = Task(
3 name='caption',
4 instruction='[IMAGE:image_url] what does the image describe? -> [TEXT:caption]',
5 micro_batch_size=4,
[/usr/local/lib/python3.9/dist-packages/ofasys/task/base.py](https://yucuju2ns5m-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230307-060233-RC01_514758488#) in __init__(self, cfg, **kwargs)
205 self.cfg.update(**kwargs)
206 self._generator = None
--> 207 self.diffuser_args = json.loads(cfg.diffuser_args) # accessed by the diffusion criterion and generator
208
209 self.datasets = {}
AttributeError: 'NoneType' object has no attribute 'diffuser_args'
There is a bug in the pip installed version
the wrong one is :
self.cfg = TaskConfig() if cfg is None else cfg
self.cfg.update(**kwargs)
self._generator = None
self.diffuser_args = json.loads(cfg.diffuser_args)
cfg is just input para, the changed one is self.cfg. Please change this in the pip version
Can I solve this problem by install this lastest version:pip install -U http://ofasys.oss-cn-zhangjiakou.aliyuncs.com/pkg/ofasys-0.1.0-py3-none-any.whl?
There is a bug in the pip installed version
the wrong one is :
self.cfg = TaskConfig() if cfg is None else cfg self.cfg.update(**kwargs) self._generator = None self.diffuser_args = json.loads(cfg.diffuser_args)
cfg is just input para, the changed one is self.cfg. Please change this in the pip version
Which version actually we need to change this?