
Reputation
Badges 1
32 × Eureka!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 ๐
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 ๐
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
To go off the online example, it finds the top 3 performing models and prints out the ID. What would be better would be to take those 3 IDs and - in the python code - grab the model artifacts for each, put them into the parent HPO model as its artifacts, and then go through the archive everything. Doesnt solve the issue if a HPO run is going to take a few days (in which the UI would become unusable), but once its done then the auto archiving would clean it up a lot. Is that possible at all, u...
Yeah I was imagining the artifact, id, link to the child task, etc, would all be saved out. I have the HPO experiment open in the UI at the moment, and yup, I can see in the Results>Plots a table summary, but that wasnt the issue, it was trying to clean up the project wide experiments view without making a large number of projects. Are tagging / archiving available in the API for a task? Also, thanks for the help so far ๐
Phew! If I find any bugs or potential issues in the doco/comments too, where would be the best place to send that so I dont spam slack if I find tiny issues. Github issues / DM / a specific slack channel?
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
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!
Ah fantastic, Ill use that over IDEs suggestions from now on ๐
Yup, I see. My apologies for not catching that before posting ๐
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?
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?
Can you throw a screenshot of the code where fig is defined?
And heres the profile page if I access it via the URL. No option to add credentials
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 print out fig to verify it at all? The logger should call to_plotly_json on the figure, so Im guessing its None
Alas no, apologies. Are you saying that in the global_min case, if a trial returns an MAE of 1.3, but the previous trial got an MAE of 0.5, the optimiser gets told that the MAE of the latest model is 0.5 instead of the truth?
Ah okay.Probably better than the Logger.report_text I was going to use to dump some json into, but I see a dict gets stores as json in upload_artifact as well. Perfect!
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.
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
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
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
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
Ah yup, found it, I was in the server Tasks doco and not the clearml Task doco, oops!
+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...
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?
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 ๐