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

Enable Downloading Machine Learning (Binary) Files #6205

Closed
4 tasks done
AlexCatarino opened this issue Feb 12, 2022 · 3 comments
Closed
4 tasks done

Enable Downloading Machine Learning (Binary) Files #6205

AlexCatarino opened this issue Feb 12, 2022 · 3 comments
Assignees
Labels

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

Be able to upload machine learning models that are trained locally.

Actual Behavior

Not supported. Users need to use the Download method that returns a string object.

Potential Solution

Add DownloadFile method to ObjectStore:
bool DownloadFile(string key, string url);
it could use the featured implemented by #6164.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@jaredbroad
Copy link
Member

Let's discuss API naming when we get there - this seems like an easy feature to add.

@alexpvpmindustry
Copy link
Contributor

seems like this is implemented with ObjectStore.ReadBytes.
https://www.lean.io/docs/v2/lean-engine/class-reference/classQuantConnect_1_1Storage_1_1ObjectStore.html#a5a6c41b2faffcc48a3fd166eee1d50a2
if so, this issue can be closed.
@jaredbroad

@AlexCatarino
Copy link
Member Author

QuantConnect users can upload any file format using Lean CLI:
https://www.quantconnect.com/docs/v2/lean-cli/object-store
We can view the storage here:
https://www.quantconnect.com/docs/v2/cloud-platform/object-store

Once the file is stored, we can load the mode using the path. E.g.:

path = self.ObjectStore.GetFilePath(<key>);
self.model = joblib.load(file_name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants