Open yone456 opened 2 years ago
It seems that some packages might be incompatible. Maybe try to use a lower version of Python or a lower version of overrides.
Thanks for the advice. The error was resolved by lowering the version of overrides to 4.0.0. There were several other errors that were encountered but were resolved.
Errors related to gdown pip install --upgrade --no-cache-dir gdown
Errors related to omegaconf pip install omegaconf==2.0.6
After training TextGAIL, we ran Generation.ipynb. However, it returned the following error.
ImportError: cannot import name 'FlyModule' from 'torchfly.trainig'
Is there any solution for this?
a good work!!!!
Dear author, May I know the version of package hydra
@qywu
Hello
Traceback (most recent call last):
File "main.py", line 36, in <module>
main()
File "main.py", line 22, in main
config = FlyConfig.load()
File "/home/hx/github项目/TorchFly/torchfly/flyconfig/flyconfig.py", line 189, in load
config.runtime.owd = os.getcwd()
AttributeError: 'NoneType' object has no attribute 'owd'
environment: omegaconf ==2.0.6 overrides ==4.0.0 TorchFly==0.0.1
How can I solve it
Hello, I am a student in Japan. Your research is very interesting. I actually tried to run your prepared code in googlecolab, but I got the following error Is there any solution for this?
!python main.py --config /config/config.yaml task.name=CommonGEN
Traceback (most recent call last): File "main.py", line 9, in
from torchfly.training import TrainerLoop
File "/content/TextGAIL/TorchFly/torchfly/training/init.py", line 2, in
from .flymodel import FlyModel
File "/content/TextGAIL/TorchFly/torchfly/training/flymodel.py", line 9, in
from torchfly.metrics import CategoricalAccuracy, Average, MovingAverage, Speed
File "/content/TextGAIL/TorchFly/torchfly/metrics/init.py", line 6, in
from .moving_average import MovingAverage
File "/content/TextGAIL/TorchFly/torchfly/metrics/moving_average.py", line 12, in
class MovingAverage(Metric):
File "/content/TextGAIL/TorchFly/torchfly/metrics/moving_average.py", line 43, in MovingAverage
def get_metric(self, reset: bool = False):
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 88, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 114, in _overrides
_validate_method(method, super_class, check_signature)
File "/usr/local/lib/python3.7/dist-packages/overrides/overrides.py", line 135, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "/usr/local/lib/python3.7/dist-packages/overrides/signature.py", line 93, in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
File "/usr/local/lib/python3.7/dist-packages/overrides/signature.py", line 288, in ensure_return_type_compatibility
f"{method_name}: return type
{sub_return}
is not a{super_return}
." TypeError: MovingAverage.get_metric: return typeNone
is not atyping.Union[float, typing.Tuple[float, ...], typing.Dict[str, float], typing.Dict[str, typing.List[float]]]
.