How can we save darts model lets say TFT Model using mlflow - time-series

I want to save my Darts TFT MODEL using mlflow and load it using mlflow. Currently i log my model using sklearn flavor not i am unable to load it.
ERROR - (AttributeError: 'Trainer' object has no attribute '_accelerator_connector')
Currently i log my model using sklearn flavor not i am unable to load it.
When i tried to load model using mlflow.sklearn.load_model() it is giving error
ERROR - (AttributeError: 'Trainer' object has no attribute '_accelerator_connector')
Any help will be really appreciated.
Thanks

Related

Yolov5 custom object detection model not loading

I have a trained a custom object detection model using yolov5 for 4 classes. I have downloaded the best.pt file. I am still confused about how to load this model using pytorch.
I tried running the following code to load the model as per Yolov5 official documentation
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt')
but when I tried printing model.names, I am not getting my custom class names. Is there anything I am missing?
Thank you!
Try clearing your cache by adding this: force_reload=True
Store your model in a local folder called model (in case you are locally
trying to run this)
then try adding this:
model = torch.hub.load('ultralytics/yolov5', 'custom', path='model/best-m.pt', force_reload=True)

rails_admin_import: Error during import:

In my models I have an AssessmentItem which has_many :items_levels. When I try to import an ItemLevel I get the error
Error during import: AssessmentItem(#70286054976500) expected, got
AssessmentItem(#70286114743280)
(/Users/stoebelj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/associations/association.rb:218:inraise_on_type_mismatch!')
As far as I know, the parent record exists and I am referencing it with the correct mapping key.
Can someone give me an idea of what this error means and what might be the culprit?
I's too having these problems.
Since, in development environment, each time you make changes to class and save it in any editor, the class is registered as a new class and hence the mismatch of class' object instances.
Stop rails server
Run it again
Reload your page
Now, try uploading again
Repeat each time you make any changes to your code.

Running Ptr-Net on MXNet

We have a Ptr-Net model that we want to run. Can the MXNet be useful for this scenario. If not, what are the other libraries that we can use to run Ptr-Net models?
We are building a Ptr-Net model using TensorFlow as of now.
Currently we don't have a complete model for Ptr-Net, but you can define symbolic model for Ptr-Net. Here is a complete example for creating char-level lstm model: http://mxnet.io/tutorials/python/char_lstm.html

How to create a 'file' model in Rails?

So I have built an API using Ruby/Sinatra and MondoDB. I'm now writing an Admin panel using Rails that connects to the same database. One of our collections is named 'files' since we need to model an object of such kind in our API. Now, when I wanted to create the File model in the Admin Panel, I came across the fact that I can't create a class called 'File'. Doing so results in the error attached
Even 'File1' is an acceptable class name. How do I now create the File model in my Rails app? I'm using Rails 5.0.0.1.
I believe that is happening because File is a reserve Rails word. I would probably rename the model to something like FileResource .
List of Reserved words: http://www.rubymagic.org/posts/ruby-and-rails-reserved-words
The file is ruby's class, you can't and should't use the name in model. Or you will replace the original File .
FileResource is a good name!

Paperclip namespace conflict

I have rather weird problem with paperclip gem. You know it defines Attachment class inside itself. So the model with exactly the same name already exists in my project. As the result in some parts of the code i cant get access to my previous Attachment model.
I tried to write full name of my model class, but the result was very interesting (in console):
ActiveRecord::Base::Attachment
=> Paperclip::Attachment
I can get access to my Attachment model inside AttachmentController and by default it console but nowhere else.
Also i tried to create simple object from console without attached file.
a.errors.sort
[]
a.save
TypeError: can't dump anonymous class Class
As you see object a has no errors but throws error in save.
Finally my aim is to copy a collection of Attachment objects from one holder-object to another. I mean deep copy, so files should be copied too. If you have any suggestions about these points I'll appreciate.
You can always access your class via "::Attachment", but make sure you're using the latest version of Paperclip. There were some namespace collision bugs that were fixed.

Resources