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

Why did I get "killed" when running 1min of alpha360? #1761

Open
DanielKui opened this issue Mar 15, 2024 · 0 comments
Open

Why did I get "killed" when running 1min of alpha360? #1761

DanielKui opened this issue Mar 15, 2024 · 0 comments
Labels
question Further information is requested

Comments

@DanielKui
Copy link

DanielKui commented Mar 15, 2024

###################################
# train model
###################################
data_handler_config = {
    "start_time":"2020-09-14",
    "end_time":"2021-06-20",
    "fit_start_time":"2020-09-20",
    "fit_end_time":"2021-05-20",
    "freq":'1min',
    "instruments": market,
}

task = {
    "model": {
        "class": "LGBModel",
        "module_path": "qlib.contrib.model.gbdt",
        "kwargs": {
            "loss": "mse",
            "colsample_bytree": 0.8879,
            "learning_rate": 0.0421,
            "subsample": 0.8789,
            "lambda_l1": 205.6999,
            "lambda_l2": 580.9768,
            "max_depth": 8,
            "num_leaves": 210,
            "num_threads": 20,
        },
    },
    "dataset": {
        "class": "DatasetH",
        "module_path": "qlib.data.dataset",
        "kwargs": {
            "handler": {
                "class": "Alpha360",
                "module_path": "qlib.contrib.data.handler",
                "kwargs": data_handler_config,
            },
            "segments": {
    "train": ("2020-09-14", "2020-10-15"),
    "valid": ("2020-10-16", "2020-12-20"),
    "test": ("2020-12-14", "2021-05-20"),
            },
        },
    },
}


h = Alpha360(**data_handler_config)
alpha360_df_feature = h.fetch(col_set="feature")
alpha360_df_feature = alpha360_df_feature.loc[:,~(alpha360_df_feature == 0.0).all()]
alpha360_df_feature = alpha360_df_feature.loc[~(alpha360_df_feature.eq(0.0).all(1))]

print(alpha360_df_feature)

# model initiaiton
model = init_instance_by_config(task["model"])
dataset = init_instance_by_config(task["dataset"])

# start exp to train model
with R.start(experiment_name="train_model"):
    R.log_params(**flatten_dict(task))
    model.fit(dataset)
    R.save_objects(trained_model=model)
    rid = R.get_recorder().id


image

when I try tu run jupyter notebook, it always showed that python kernel has been restarted.

What's datetime range does it support? I tried one day range, it works fine from 2020-09-14 to 2020-09-15,
Most of feature in alpha360 are zero. this range may a little bit short.

My machine:
Debian 11
RAM 64G
4 processors

@DanielKui DanielKui added the question Further information is requested label Mar 15, 2024
@DanielKui DanielKui changed the title Why did I got "killed" when running 1min of alpha360? Why did I get "killed" when running 1min of alpha360? Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant