Skip to content

Fix torch models on cpu#782

Merged
you-n-g merged 1 commit intomicrosoft:mainfrom
cning112:fix-torch-models-on-cpu
Dec 28, 2021
Merged

Fix torch models on cpu#782
you-n-g merged 1 commit intomicrosoft:mainfrom
cning112:fix-torch-models-on-cpu

Conversation

@cning112
Copy link
Contributor

Description

To make torch-based models runnable when cuda is unavailable

Motivation and Context

Some of the benchmark examples (such as GATs) doesn't run when cpu-only because of the missing map_location argument in torch.load() function

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@cning112 cning112 force-pushed the fix-torch-models-on-cpu branch from 14ed5fd to a3859bd Compare December 28, 2021 12:53
@you-n-g
Copy link
Collaborator

you-n-g commented Dec 28, 2021

Thanks! It looks great!

@you-n-g you-n-g merged commit 622303b into microsoft:main Dec 28, 2021
@you-n-g you-n-g added the bug Something isn't working label Jan 12, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
you-n-g pushed a commit to you-n-g/qlib that referenced this pull request Aug 16, 2025
)

* task gen refine & feedback refine

* fix

* refine feedback logic

* fix a bug

* fix

* fix

* fix ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants