mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
Update darts (#2750)
This commit is contained in:
2
build/conda/conda-3-9-env-full.yaml
vendored
2
build/conda/conda-3-9-env-full.yaml
vendored
@@ -5,6 +5,6 @@ dependencies:
|
||||
- python=3.9.6
|
||||
- pip
|
||||
- pytorch-lightning=1.6.5
|
||||
- u8darts[torch]=0.21.0
|
||||
- u8darts[torch]=0.23.0
|
||||
- poetry=1.1.13
|
||||
- cvxpy=1.2.1
|
||||
|
||||
@@ -30,7 +30,6 @@ def get_brnn_data(
|
||||
output_chunk_length: int = 5,
|
||||
model_type: str = "LSTM",
|
||||
n_rnn_layers: int = 1,
|
||||
hidden_size: int = 20,
|
||||
dropout: float = 0.0,
|
||||
batch_size: int = 32,
|
||||
n_epochs: int = 100,
|
||||
@@ -62,8 +61,6 @@ def get_brnn_data(
|
||||
Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM".
|
||||
n_rnn_layers (int, optional):
|
||||
Number of layers in the RNN module. Defaults to 1.
|
||||
hidden_size (int, optional):
|
||||
Size for feature maps for each hidden RNN layer. Defaults to 20.
|
||||
dropout (float, optional):
|
||||
Fraction of neurons afected by Dropout. Defaults to 0.0.
|
||||
batch_size (int, optional):
|
||||
@@ -121,7 +118,6 @@ def get_brnn_data(
|
||||
output_chunk_length=output_chunk_length,
|
||||
model=model_type,
|
||||
n_rnn_layers=n_rnn_layers,
|
||||
hidden_size=hidden_size,
|
||||
dropout=dropout,
|
||||
batch_size=batch_size,
|
||||
n_epochs=n_epochs,
|
||||
|
||||
@@ -29,7 +29,6 @@ def display_brnn_forecast(
|
||||
output_chunk_length: int = 5,
|
||||
model_type: str = "LSTM",
|
||||
n_rnn_layers: int = 1,
|
||||
hidden_size: int = 20,
|
||||
dropout: float = 0.0,
|
||||
batch_size: int = 16,
|
||||
n_epochs: int = 100,
|
||||
@@ -71,8 +70,6 @@ def display_brnn_forecast(
|
||||
Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM".
|
||||
n_rnn_layers (int, optional):
|
||||
Number of layers in the RNN module. Defaults to 1.
|
||||
hidden_size (int, optional):
|
||||
Size for feature maps for each hidden RNN layer. Defaults to 20.
|
||||
dropout (float, optional):
|
||||
Fraction of neurons afected by Dropout. Defaults to 0.0.
|
||||
batch_size (int, optional):
|
||||
@@ -130,7 +127,6 @@ def display_brnn_forecast(
|
||||
output_chunk_length=output_chunk_length,
|
||||
model_type=model_type,
|
||||
n_rnn_layers=n_rnn_layers,
|
||||
hidden_size=hidden_size,
|
||||
dropout=dropout,
|
||||
batch_size=batch_size,
|
||||
n_epochs=n_epochs,
|
||||
|
||||
@@ -368,7 +368,7 @@ class ForecastController(BaseController):
|
||||
past_covariates: bool = False,
|
||||
all_past_covariates: bool = False,
|
||||
lags: bool = False,
|
||||
hidden_size: int = None,
|
||||
hidden_size: int = 0,
|
||||
n_jumps: bool = False,
|
||||
end: bool = False,
|
||||
start: bool = False,
|
||||
@@ -2170,7 +2170,6 @@ class ForecastController(BaseController):
|
||||
target_dataset=True,
|
||||
n_days=True,
|
||||
target_column=True,
|
||||
hidden_size=20,
|
||||
residuals=True,
|
||||
forecast_only=True,
|
||||
start=True,
|
||||
@@ -2198,7 +2197,6 @@ class ForecastController(BaseController):
|
||||
output_chunk_length=ns_parser.output_chunk_length,
|
||||
model_type=ns_parser.model_type,
|
||||
n_rnn_layers=ns_parser.n_rnn_layers,
|
||||
hidden_size=ns_parser.hidden_size,
|
||||
dropout=ns_parser.dropout,
|
||||
batch_size=ns_parser.batch_size,
|
||||
n_epochs=ns_parser.n_epochs,
|
||||
|
||||
@@ -706,7 +706,6 @@ def plot_residuals(
|
||||
num_bins: int = 20,
|
||||
default_formatting: bool = False,
|
||||
):
|
||||
del default_formatting
|
||||
if past_covariates:
|
||||
console.print(
|
||||
"[red]Cannot calculate and plot residuals if there are past covariates.[/red]"
|
||||
@@ -728,8 +727,7 @@ def plot_residuals(
|
||||
residuals=residuals,
|
||||
num_bins=num_bins,
|
||||
fill_nan=True,
|
||||
# TODO: uncomment this once darts pr #1224 becomes a part of the package
|
||||
# default_formatting=default_formatting,
|
||||
default_formatting=default_formatting,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1735,10 +1735,10 @@ def screenshot_to_canvas(shot, plot_exists: bool = False):
|
||||
x = int((background.width - OUTSIDE_CANVAS_WIDTH) / 2)
|
||||
y = UPPER_SPACE
|
||||
|
||||
white_shape = [
|
||||
white_shape = (
|
||||
(x, y),
|
||||
(x + OUTSIDE_CANVAS_WIDTH, y + OUTSIDE_CANVAS_HEIGHT),
|
||||
]
|
||||
)
|
||||
img = ImageDraw.Draw(background)
|
||||
img.rounded_rectangle(
|
||||
white_shape,
|
||||
|
||||
@@ -14,8 +14,6 @@ Perform BRNN forecast (Vanilla RNN, LSTM, GRU)
|
||||
optional arguments:
|
||||
--n-rnn-layers N_RNN_LAYERS
|
||||
Number of layers in the RNN module. (default: 1)
|
||||
--hidden-size HIDDEN_SIZE
|
||||
Size for feature maps for each hidden RNN layer (h_n) (default: 20)
|
||||
--past-covariates PAST_COVARIATES
|
||||
Past covariates(columns/features) in same dataset. Comma separated. (default: None)
|
||||
--all-past-covariates
|
||||
|
||||
Reference in New Issue
Block a user