AI4Finance-Foundation / AI4Finance-Foundation/ElegantRL

Missing module "init_agent" in run.py

Open
#314 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
4.4k
Forks
978
PR merge metrics
No merged PRs in 30d

Description

While testing the FinRL_MultiCrypto_Trading.ipynb notebook, it throws out an error in the following

ImportError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
----> 1 from agents.elegantrl_models import DRLAgent as DRLAgent_erl
2 from agents.rllib_models import DRLAgent as DRLAgent_rllib
3 from agents.stablebaselines3_models import DRLAgent as DRLAgent_sb3
4 from meta.data_processor import DataProcessor
5

[/FinRL-Meta/agents/elegantrl_models.py](https://localhost:8080/#) in
6 from elegantrl.agents import AgentTD3
7 from elegantrl.train.config import Config
----> 8 from elegantrl.train.run import init_agent
9 from elegantrl.train.run import train_and_evaluate
10

ImportError: cannot import name 'init_agent' from 'elegantrl.train.run' (/usr/local/lib/python3.10/site-packages/elegantrl/train/run.py)

It looks like the function is removed and it was there in the previous version of run.py. Wondering if which version is proper for the notebook? Is it better to find the recent one which the function still exist to run or editing the notebook?

Many thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.