微信扫码
与创始人交个朋友
我要投稿
ML-Workspace
。MyFirstMLWorkspace
。from azureml.core import Workspace, Dataset # 连接到你的工作区ws = Workspace.from_config() # 上传CSV文件并创建数据集datastore = ws.get_default_datastore()datastore.upload_files(['./data/train.csv'], target_path='train-data/', overwrite=True) # 创建一个Tabular数据集dataset = Dataset.Tabular.from_delimited_files(path=[(datastore, 'train-data/train.csv')]) # 打印前5行数据df = dataset.to_pandas_dataframe()print(df.head())
from azureml.core import Experiment, ScriptRunConfig, Workspacefrom sklearn.datasets import load_irisfrom sklearn.model_selection import train_test_splitfrom sklearn.ensemble import RandomForestClassifierfrom joblib import dump # 加载数据集data = load_iris()X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2) # 训练模型clf = RandomForestClassifier()clf.fit(X_train, y_train) # 保存模型dump(clf, 'iris_model.pkl') # 上传模型到Azurews = Workspace.from_config()model = ws.models.register(model_path='iris_model.pkl', model_name='iris_model')print(f"模型已注册为:{model.name}, 版本:{model.version}")
from azureml.core import Model, Webservice, Workspacefrom azureml.core.model import InferenceConfig # 加载工作区ws = Workspace.from_config() # 获取注册的模型model = Model(ws, name='iris_model') # 定义推理环境inference_config = InferenceConfig(entry_script='score.py', environment=myenv) # 创建容器实例服务service = Webservice.deploy_from_model(ws, name='iris-service', models=[model], inference_config=inference_config, deployment_config=None)service.wait_for_deployment(show_output=True) print(f"服务已部署在:{service.scoring_uri}")
53AI,企业落地应用大模型首选服务商
产品:大模型应用平台+智能体定制开发+落地咨询服务
承诺:先做场景POC验证,看到效果再签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2025-01-06
硬件 | 孤独感驱使AI陪伴需求增长
2025-01-06
罗永浩进军AI领域,J1 Assistant震撼发布:语音交互的智能新时代
2025-01-05
微软解析“教育+AI”:小模型带来的智能硬件大爆发,教育亦有结合机会
2025-01-04
独家 | 与李想的3小时对谈(完整版)
2025-01-04
上市一季度销量破万,AI问答机成就2025首个AI硬件融资
2025-01-04
拿到数亿融资后,梅涛想说说这代AI创业者的创业解法
2024-12-31
火山引擎打通了「AI+硬件」的最后一纳米
2024-12-30
AI+玩偶:是儿童市场的新风口,还是智能硬件的老泡沫?
2024-03-30
2024-05-09
2024-07-07
2024-06-23
2024-07-23
2024-07-01
2024-06-24
2024-06-08
2024-06-05
2024-06-21
2024-12-30
2024-12-26
2024-12-20
2024-12-15
2024-11-12
2024-11-11
2024-10-29
2024-10-22