Reputation
Badges 1
32 × Eureka!Yeah its trying to plan down the line into model deployment. Whilst its easy to save out a keras SavedModel or similar and have that artifact uploaded into the store, just wanted to check if there was a more generic solution. I could just create a Python class and serialise that out such that it has a standard interface, but good to check. So for example, some artifact representing an arbitrary math function. For better context, the idea is to make deploying any artifact we upload using clear...
Compared to the settings I can see when I go through the online portal and use the free hosted version:
So Im guessing either return_fig is False when you ran this, or plt.cdf is having issues (which it can). Id always recommend explicitly creating the figure instead of using the plt shortcuts.
fix, ax = plt.subplots()
ax.plot(โฆ)
etc
Yes, this is expected, because you are trying to log a matplotlib figure as if it was a plotly figure. Try using report_matplotlib_figure
Can you print out fig to verify it at all? The logger should call to_plotly_json on the figure, so Im guessing its None
I meant the object instance itself so we can see what class it is and if its initialised. Also that looks like a matplotlib plot, not a plotly plot which you logging call indicates
Can you throw a screenshot of the code where fig is defined?
Okay, that makes sense then. Whats still got me scratching my head is the examples printing out the WOOT WOOT for breaking the record, despite it clearly not. Hmm.
+1 for autoarchiving. Right now the interface feels incredibly clunky to use once the number of HPO trials starts to increase. I currently have a demo project and have different algos to make predictions (a simple keras model, a RF, etc). Ideally Iโd want to see the HPO execution just once with all the trials underneath it, or just the top (few) models. At the moment, I have pages and pages of models, 99% of them I dont care about. Is it possible to archive models and set tags in the code rat...
Ah yup, found it, I was in the server Tasks doco and not the clearml Task doco, oops!
Yeah, post execution in a separate script / task
Ah fantastic, thanks! Another one for me - is there support for custom python models at all? For example, dummy models that simply return the output of an equation run over the dataframe after transforming some of the input columns. Something similar to mlflows custom pyfunc that allows a standard way of interfacing with custom models as you do with keras/sklearn/pytorch models
How so? The view can be used to just initialise the plot above like I had done all the steps by hand, but any flexibility (add in other scalars/parameters) Id expect would still be viable options in the UI
And heres the profile page if I access it via the URL. No option to add credentials
Yup, I see. My apologies for not catching that before posting ๐
Ah fantastic, Ill use that over IDEs suggestions from now on ๐
How odd, its not in my task.py file!
Let me checkโฆ
Ah. The code inspector is jumping to backend_interface.task.py, not clearml.task.py, how embarrassing for me!
Oh btw the set_system_tags we talked about previously to auto-archive by adding the archived tag is throwing me an error.
for t in top_exp: t.set_tags(t.get_tags() + ["trial"]) t.set_system_tags(t.get_system_tags() + ["archived"])
With error: ValueError: Task object can only be updated if created or in_progress
I think its because the _edit
call happens after the set_task_property
call?
Fantastic. Essentially the example provide just prints out ids to the log file, and Im trying to play around with better things to do so that the top models and similar are saved out in some way I can access without manually reading a log file. Maybe reporting a scalar thats a string which has the task id for the top model? Unsure the best way, hence why I was trying to access the optimiser itself which would naturally contain that info
Thanks Martin, this is super useful. Using the get_top_experiments would be great, but do I actually have access to the controller (an_optimizer) from the Task object itself? I dont see anything like an_optimizer = task.connect(an_optimizer)
which seems to be the normal way of connecthing things up?
Hey AgitatedDove14 , another question if I can! Im trying to access this information from the API so I can put it as an artifact as well. Currently this is quite a few lines of code using get_top_experiments and get_last_scalar_metrics()[โevaluateโ][โmaeโ][โlastโ], again I feel like Im missing something as I assume theres a far simpler way of getting data displayed so easily in the UI ๐
Awesome. If I end up convincing the team to use ClearML, Ill probably have a ton of small requests to streamline the automation side of orchestration, is the team open to PRs from external people?
But ideally yes, the HPO should have a df artifact summarising the HPO itself so I can try and make use of the information properly ๐
Ah I see, it does print out the top experiments, you jus thave to make sure the metric and what not agrees. If I was looking to just attach some basic information to the task (after its been rerun, instead of printing it to the log), would the best option be to use the Logger to try and attach it, or set parameters, set comment, or is there a general way to set some metadata that is intended to be used in that capacity.
Im trying to do it at the end of the optimisation. The same place in the example where you print the ids to the log. Im just hoping theres a way to get said table simply rather than going through a bunch of api calls to construct it myself
the top models in the example arent saved out in a useful way, just printed out. Im trying to figure out th ebest way of saving these IDs so I can get the tasks/models
Yup, thats how Ive been doing it now. Will happily update to a simpler method call whenever one gets made. Trying to make use of the HPO is a big thing Im trying to sell the team on, as its what sets ClearML apart from MLFlow or neptune - useful task orchestration and cloning ๐
Ah that did the trick, thanks a ton! Would be good to add deleting cookies to the upgrading process in the docs below if thats an easy thing to do ๐ https://allegro.ai/clearml/docs/docs/deploying_clearml/clearml_server_linux_mac.html