mljar / mljar-api-python Goto Github PK
View Code? Open in Web Editor NEWA simple python wrapper over MLJAR API.
Home Page: https://docs.mljar.com/
License: Apache License 2.0
A simple python wrapper over MLJAR API.
Home Page: https://docs.mljar.com/
License: Apache License 2.0
Hello. I see you have a github repo for mljar-api-...
and mljar-docs
.
Why not create a github repository called mljar-app
for users to submit issues to?
Here is what I'm doing
>>> model.fit(train_features, train_target.squeeze())
Ups, Something bad happend! There is no attributes usage defined for your dataset
When I look in mljar.com, I see that the attribute usage is not accepted.
Edit 1: Looking in mljar.com, I also notice that the target is categorical with unique values True, False, "target" (string being "target"). My target in python was a numpy pandas array with just True/False. Maybe this was the problem with automatic acceptance of attribute usage.
This columns is also marked with "use it" and not as target. Accepting without changing it to target says something along the lines of "error, should have target". Changing it to target yields error like "binary classification target should have 2 values only."
Edit 2: target was pandas array and not numpy array .. fixed inline
There used to be a list of checkboxes of algorithms to select from. Now it's empty.
There are multiple experiments in my project.
When I ran mljar.fit(...)
for my 2nd experiment,
I got results that looked like results from my 1st experiment.
Digging deeper, I found that the function ResultClient(project id).get_results(experiment id)
(link)
was not filtering the results for the experiment ID being passed.
For example, the code below
clf_mlj = Mljar(
project='some project name',
experiment='some experiment name',
...
)
from mljar.client.result import ResultClient
client = ResultClient(clf_mlj.project.hid)
results = client.get_results(clf_mlj.experiment.hid)
len(results) # returns 75
results = client.get_results(None)
len(results) # returns 75 as well
In a previous python session, I ran model = Mljar(...)
and model.fit(...)
and it was fine.
Upon closing the python session and opening a new one, doing model = Mljar(...)
followed by model.predict(...)
returns Can not run prediction. Please run fit method first, to start models training and to retrieve them ;)
eventhough the fit
method had been called earlier.
Hi. I used the predict
method on a pandas dataframe with the same column names of the dataframe used in the fit
method, but the columns with the predict
method got renamed from 1
to attribute_1
, 2
to attribute_2
, etc. Is this because the column names are numeric?
Just my 2 cents:
ATM, it seems that there are no git tags in the repository,
which makes it non-straight-forward to figure out if a function parameter,
e.g. fit(..., dataset_title)
,
is part of the 0.0.6 release on pypi.
Perhaps for 0.0.7 and later versions, you can just run git tag 0.0.7 && git push origin 0.0.7
for the same version published to pypi
When computing predictions on windows machine there is error:
pred = Mljar.compute_prediction(df, model_id = 'xxxxxxx', project_id = 'xxxxxxxxxxxx',keep_dataset=True)
IOError Traceback (most recent call last)
<ipython-input-8-e3ccbf396609> in <module>()
----> 1 pred = Mljar.compute_prediction(df, model_id = 'xxxxxxxx', project_id = 'xxxxxxxxxx',keep_dataset=True)
c:\python27\lib\site-packages\mljar\mljar.pyc in compute_prediction(X, model_id, project_id, keep_dataset)
328
329 # chack if dataset exists in mljar if not upload dataset for prediction
--> 330 dataset = DatasetClient(project_id).add_dataset_if_not_exists(X, y = None)
331
332 # check if prediction is available
c:\python27\lib\site-packages\mljar\client\dataset.pyc in add_dataset_if_not_exists(self, X, y, title_prefix)
128 if len(dataset_details) == 0:
129 # add new dataset
--> 130 dataset_details = self.add_new_dataset(data, y, title_prefix)
131 else:
132 dataset_details = dataset_details[0]
c:\python27\lib\site-packages\mljar\client\dataset.pyc in add_new_dataset(self, data, y, title_prefix)
166 prediction_only = y is None
167 # save to local storage
--> 168 data.to_csv(file_path, index=False)
169 # compress
170 file_path_zip = file_path + '.zip'
c:\python27\lib\site-packages\pandas\core\frame.pyc in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, compression, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, decimal)
1401 doublequote=doublequote,
1402 escapechar=escapechar, decimal=decimal)
-> 1403 formatter.save()
1404
1405 if path_or_buf is None:
c:\python27\lib\site-packages\pandas\io\formats\format.pyc in save(self)
1569 f, handles = _get_handle(self.path_or_buf, self.mode,
1570 encoding=self.encoding,
-> 1571 compression=self.compression)
1572 close = True
1573
c:\python27\lib\site-packages\pandas\io\common.pyc in _get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text)
377 if compat.PY2:
378 # Python 2
--> 379 f = open(path_or_buf, mode)
380 elif encoding:
381 # Python 3 and encoding
IOError: [Errno 2] No such file or directory: '/tmp/dataset-f8f18b2e.csv'
Hello. When I call fit
from the mljar python API, it fails with the following status on each of the experiments: Status details: Error : Unknown label type: continuous
Edit: also, the fit
call just hangs without returning any error
Hello. It seems that mljar is python2-compatible but not python3-compatible (e.g. some print ...
calls without parentheses, the from mljar import Mljar
call in mljar.__init__
).
Any plan on releasing a python3-compatible version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.