GithubHelp home page GithubHelp logo

BFloat16 is not supported on MPS about lida HOT 1 OPEN

lawyinking avatar lawyinking commented on September 16, 2024
BFloat16 is not supported on MPS

from lida.

Comments (1)

lawyinking avatar lawyinking commented on September 16, 2024

I solved this problem by modifying the accelerate package following this link: https://github.com/huggingface/accelerate/pull/2227/files
also found from this link: https://github.com/huggingface/accelerate/issues/2226

hope it helps
but another problem appeared:

my code:
charts = lida.visualize(summary=summary, goal=goals, textgen_config=textgen_config, library=library)

Error messages:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[12], line 1
----> 1 charts = lida.visualize(summary=summary, goal=goals, textgen_config=textgen_config, library=library)

File /opt/homebrew/lib/python3.11/site-packages/lida/components/manager.py:202, in Manager.visualize(self, summary, goal, textgen_config, library, return_error)
199 goal = Goal(question=goal, visualization=goal, rationale="")
201 self.check_textgen(config=textgen_config)
--> 202 code_specs = self.vizgen.generate(
203 summary=summary, goal=goal, textgen_config=textgen_config, text_gen=self.text_gen,
204 library=library)
205 charts = self.execute(
206 code_specs=code_specs,
207 data=self.data,
(...)
210 return_error=return_error,
211 )
212 return charts

File /opt/homebrew/lib/python3.11/site-packages/lida/components/viz/vizgenerator.py:27, in VizGenerator.generate(self, summary, goal, textgen_config, text_gen, library)
23 def generate(self, summary: Dict, goal: Goal,
24 textgen_config: TextGenerationConfig, text_gen: TextGenerator, library='altair'):
25 """Generate visualization code given a summary and a goal"""
---> 27 library_template, library_instructions = self.scaffold.get_template(goal, library)
28 messages = [
29 {"role": "system", "content": system_prompt},
30 {"role": "system", "content": f"The dataset summary is : {summary} \n\n"},
(...)
33 "content":
34 f"Always add a legend with various colors where appropriate. The visualization code MUST only use data fields that exist in the dataset (field_names) or fields that are transformations based on existing field_names). Only use variables that have been defined in the code or are in the dataset summary. You MUST return a FULL PYTHON PROGRAM ENCLOSED IN BACKTICKS ``` that starts with an import statement. DO NOT add any explanation. \n\n THE GENERATED CODE SOLUTION SHOULD BE CREATED BY MODIFYING THE SPECIFIED PARTS OF THE TEMPLATE BELOW \n\n {library_template} \n\n.The FINAL COMPLETED CODE BASED ON THE TEMPLATE above is ... \n\n"}]
36 completions: TextGenerationResponse = text_gen.generate(
37 messages=messages, config=textgen_config)

File /opt/homebrew/lib/python3.11/site-packages/lida/components/scaffold.py:21, in ChartScaffold.get_template(self, goal, library)
19 def get_template(self, goal: Goal, library: str):
---> 21 general_instructions = f"If the solution requires a single value (e.g. max, min, median, first, last etc), ALWAYS add a line (axvline or axhline) to the chart, ALWAYS with a legend containing the single value (formatted with 0.2F). If using a where semantic_type=date, YOU MUST APPLY the following transform before using that column i) convert date fields to date types using data[''] = pd.to_datetime(data[], errors='coerce'), ALWAYS use errors='coerce' ii) drop the rows with NaT values data = data[pd.notna(data[])] iii) convert field to right time format for plotting. ALWAYS make sure the x-axis labels are legible (e.g., rotate when needed). Solve the task carefully by completing ONLY the AND section. Given the dataset summary, the plot(data) method should generate a {library} chart ({goal.visualization}) that addresses this goal: {goal.question}. DO NOT WRITE ANY CODE TO LOAD THE DATA. The data is already loaded and available in the variable data."
23 matplotlib_instructions = f" {general_instructions} DO NOT include plt.show(). The plot method must return a matplotlib object (plt). Think step by step. \n"
25 if library == "matplotlib":

AttributeError: 'list' object has no attribute 'visualization'`

Still solving.

from lida.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.